Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

plan to support state object. #21

Closed
seokgyo opened this issue Nov 12, 2015 · 4 comments
Closed

plan to support state object. #21

seokgyo opened this issue Nov 12, 2015 · 4 comments

Comments

@seokgyo
Copy link

seokgyo commented Nov 12, 2015

history.pushState() takes a state object as first parameter and Link tag takes it as a property. It looks like redux-simple-router do not support this state object yet.
Do you have a plan to support this?

@jlongster
Copy link
Member

Hadn't thought about it much, but yep, we definitely could add it as a parameter in the updatePath parameter, store it in redux and then pass it to pushState. Only thing to be careful is to make sure it's a serializable thing, but it probably is.

@ryanflorence
Copy link

We're going to be adding push and replace (instead of pushState and replaceState) to History, the signature will be:

push(path, state)
replace(path, state)

Seems like you can just say your API, could get your API ready by adding those two actions as well with the same signature.

@jlongster
Copy link
Member

@ryanflorence thanks. I'm not sure how I feel about just a push and replace action; seeing those actions in the wild don't really describe what they do (but as methods on history is totally makes sense). Maybe pushRoute and replaceRoute, or pushPath and replacePath?

@jlongster
Copy link
Member

Let's move the discussion for state here: #38

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants