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

Documentation change: pushState doesn't trigger hashchange events #152

Closed
juanpaco opened this issue Jan 1, 2016 · 4 comments
Closed

Documentation change: pushState doesn't trigger hashchange events #152

juanpaco opened this issue Jan 1, 2016 · 4 comments

Comments

@juanpaco
Copy link

juanpaco commented Jan 1, 2016

This may be common knowledge that I just discovered this morning, but TIL that the History API methods don't trigger hashchange events. So if one is, for example and, uh, hypothetically speaking of course, using the hash history in react-router (yes, it's not the preferred method, but, well, reasons), then emitting pushPath events that change only the hash don't end up triggering react-router or anything else that relies on listening for hashchange events.

I don't think this is a bug with this project, but thought it might be worth mentioning in the documentation. I'm happy to write that, if y'all also think it would be worthwhile.

@kimjoar
Copy link
Collaborator

kimjoar commented Jan 1, 2016

Hi @juanpaco. As you don't have any code here it's difficult to see what the problem is, but redux-simple-router definitely works with hash history. Is this the same issue as #145? (i.e. you need to pass the same history to redux-simple-router as you do to react-router)

@juanpaco
Copy link
Author

juanpaco commented Jan 1, 2016

Derp. Same problem indeed, and the example on the homepage does demonstrate using the same history object.

Thank you for the help.

Are you interested in some doc language making it more explicit that the same object needs to be used?

@kimjoar
Copy link
Collaborator

kimjoar commented Jan 1, 2016

There are some big changes going into master right now so we need to rework the docs and examples soon either way, so I think we can wait with doc changes.

@kimjoar kimjoar closed this as completed Jan 1, 2016
@juanpaco
Copy link
Author

juanpaco commented Jan 1, 2016

Cool, cool. Well, thanks for the project and Happy New Year!

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

2 participants