Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(router): fix location on newstate #343

Merged
merged 1 commit into from
Dec 5, 2016
Merged

Conversation

yoshuawuyts
Copy link
Member

Fixes location being passed on a first render; we were incorrectly reading from a nonexisting previous render which resulted in the location being dropped in a first render - not good

@yoshuawuyts
Copy link
Member Author

oh god this patch was wrong; updating! - the revamped sheet-router/create-href method takes care of the issues we used to have (e.g. parts of the destructured route state not being updated) so doing it inside choo no longer makes sense. In this case reading the old value was causing a bug where route updates were one tick behind causing super weird things to happen.

Glad I ran into this before merging and not someone else at a later stage hah

@yoshuawuyts
Copy link
Member Author

ya ok merging ✨

@yoshuawuyts yoshuawuyts merged commit b432cf9 into 4 Dec 5, 2016
@yoshuawuyts yoshuawuyts deleted the fix-params-on-newstate branch December 5, 2016 14:30
yoshuawuyts added a commit that referenced this pull request Dec 11, 2016
yoshuawuyts added a commit that referenced this pull request Dec 11, 2016
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant