[major] choo v4 (#352)

* location: change url on location:setLocation

- [ ] don't break hashing
- [ ] allow not changing the url

fixup! move fns around

fixup! add search string

* app.start: clean

* walk: add

* location: update arg calls

* fixup! location: update

* uri-wrap: fix thunking

* router: update to latest sheet-router (#239)

* router: update to latest sheet-router

* tests: fix for latest version

* tests: fix SSR

* tests: fix history

* tests: spruce up

* docs: update example

* examples: update

* deps: bump sheet-router

* 4.0.0-0

* chore(changelog): 4.0.0 (#211)

* feat(api:) arg order (#268)

* s/data, state/state, data/

* feat(api): swap arguments

* fix(href): fix routing (#271)

* feat(http): remove (#269)

* feat(router): enable hash routing (#273)

* deps: fix mount

* 4.0.0-1

* feat(mount): copy {script,link} tags

* 4.0.0-2

* fix(mount): forEach -> for

Lol can't use forEach

* fix(router): use state.location.href (#282)

* fix(mount): use deep node clone

* 4.0.0-3

* fix(deps): remove hash-match

* 4.0.0-4

* fix(mount): return node

* 4.0.0-5

* fix(router): check if a hash is a valid selector (#339)

* 4.0.0-6

* fix(router): pass params on newstate (#343)

* 4.0.0-7

* feat(docs): update for 4.0.0 (#320)

* feat(docs): update for 4.0.0

* docs: update router example in readme (#337)

* chore(changelog): update for v4 (#351)
This commit is contained in:
Yoshua Wuyts
2016-12-11 19:35:29 +01:00
committed by GitHub
parent 54b6000800
commit a7916ec3f9
30 changed files with 569 additions and 503 deletions
+1 -3
View File
@@ -7,9 +7,7 @@ const app = choo()
app.model(stopwatch)
app.router((route) => [
route('/', mainView)
])
app.router(['/', mainView])
const tree = app.start()
document.body.appendChild(tree)
+6 -6
View File
@@ -8,14 +8,14 @@ module.exports = {
laps: []
},
reducers: {
start: (data, state) => ({ start: true, startTime: Date.now() - state.elapsed }),
stop: (data, state) => ({ start: false }),
update: (data, state) => ({ elapsed: data }),
reset: (data, state) => ({ startTime: Date.now(), elapsed: 0, laps: [] }),
add: (data, state) => ({ laps: state.laps.concat(data) })
start: (state, data) => ({ start: true, startTime: Date.now() - state.elapsed }),
stop: (state, data) => ({ start: false }),
update: (state, data) => ({ elapsed: data }),
reset: (state, data) => ({ startTime: Date.now(), elapsed: 0, laps: [] }),
add: (state, data) => ({ laps: state.laps.concat(data) })
},
effects: {
now: (data, state, send, done) => {
now: (state, data, send, done) => {
if (state.start) {
let elapsed = data - state.startTime
send('update', elapsed, done)
+2 -2
View File
@@ -4,13 +4,13 @@
"description": "",
"main": "client.js",
"scripts": {
"start": "budo client.js -p 8080 -- -t es2020"
"start": "bankai start --entry=client.js -p 8080"
},
"keywords": [],
"author": "traducer <traducer21@gmail.com>",
"license": "ISC",
"dependencies": {
"budo": "^8.3.0",
"bankai": "^3.2.0",
"raf": "^3.2.0"
},
"devDependencies": {