This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var Router5 = require('router5').Router5; | |
var historyPlugin = require('router5-history'); | |
var router = new Router5() | |
.addNode('one', '/home') | |
.addNode('two', '/about') | |
.addNode('three', '/contact') | |
.addNode('four', '/contact/:id') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var Router5 = require('router5').Router5; | |
var historyPlugin = require('router5-history'); | |
var router = new Router5() | |
.addNode('one', '/home') | |
.addNode('two', '/about') | |
.addNode('three', '/contact') | |
.addNode('four', '/contact/:id') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/6.0.20/browser.min.js"></script> | |
<script src="https://wzrd.in/standalone/router5"></script> | |
<script src="https://wzrd.in/standalone/router5-history"></script> | |
</head> | |
<body> | |
<button id="one">one</button> | |
<button id="two">two</button> | |
<button id="three">three</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
html | |
head | |
body | |
button(id='one') one | |
button(id='two') two | |
button(id='three') three | |
button(id='four') four | |
button(id='five') five | |
div(id='test') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var Router5 = require('router5').Router5; | |
var historyPlugin = require('router5-history'); | |
var router = new Router5() | |
.addNode('one', '/home') | |
.addNode('two', '/about') | |
.addNode('three', '/contact') | |
.addNode('four', '/contact/:id') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var Router5 = require('router5').Router5; | |
var historyPlugin = require('router5-history'); | |
var router = new Router5() | |
.addNode('one', '/home') | |
.addNode('two', '/about') | |
.addNode('three', '/contact') | |
.addNode('four', '/contact/:id') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Control.Monad.Eff | |
import Debug.Trace | |
foreign import data Random :: ! | |
foreign import data Lazy :: * -> * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var R = require('ramda'); | |
function memoizePromise(fn){ | |
var cache = {}; | |
return function(){ | |
var key = R.toString(arguments); | |
if(cache.hasOwnProperty(key)){ | |
return cache[key]; | |
} | |
else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var R = require('ramda'); | |
function memoizePromise(fn){ | |
var cache = {}; | |
return function(){ | |
var key = R.toString(arguments); | |
if(cache.hasOwnProperty(key)){ | |
return cache[key]; | |
} | |
else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (Html, div, text, input, button) | |
import Html.Attributes exposing (value, placeholder) | |
import Html.Events exposing (on, targetValue, onClick) | |
import Signal as Signal | |
import StartApp | |
import List exposing (head, tail) | |
type alias Model = { text:String } | |
type Action = UpdateText String |