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

listenForReplays is making async action in history.listenBefore never ending loop #268

Closed
svrcekmichal opened this issue Feb 10, 2016 · 6 comments

Comments

@svrcekmichal
Copy link
Contributor

Hi, after little bit of hacking with react, redux, router and redux I came to strange issue, which i believe was bug in history package

Then i tried to locate the problem and what i found out is that there is no problem with history, neither react-router implementation, but in react-router-redux package.

I tried to put down some functionalities and found out that issue is coming from listenForReplays. How to simulate problem an be seen in original issue in history package.

I'm going to try and dig little more to found exact problem, but if there is someone who knows right now where' s problem it would be awesome

@gaearon
Copy link
Member

gaearon commented Feb 10, 2016

Mind giving 4.0.0-beta.1 a spin? I wonder if #259 solved it. Note that it has a slightly different API: https://github.com/rackt/react-router-redux/blob/synchronicity/README.md

@gaearon
Copy link
Member

gaearon commented Feb 10, 2016

If it doesn’t solve the problem please provide exact ways to reproduce with the bundled example project.

@svrcekmichal
Copy link
Contributor Author

@gaearon going to try and reproduce, for now i was able to to stop the issue, but it has not so much to do with redux-react-router, issue stopped when i disabled dev tools, especially when i commented this two lines

if i dont comment those two lines, it works if i use setTimeout with value around 100ms, i guess even values with less than 1000ms will be working in special occasions, as it is lower than timeout in log monitor. If bigger value is used, you cant use router at all as all actions are overriden.

To see the issue for now, you can clone this branch

For now, I'm going to try that 4.0.0-beta.1 and let you know how it works

@gaearon
Copy link
Member

gaearon commented Feb 10, 2016

Please do try the new branch. If there is an issue it is related to this library. The fact that log monitor dispatches actions is not relevant: that the library fails when actions are dispatched fast is the problem, and we need to figure out why, and check whether 4.x will fix that.

@svrcekmichal
Copy link
Contributor Author

@gaearon everything works, for now you are my little god 👍 I'm going to check what you have change to learn, I have so much to learn from you :) thanks once more

@svrcekmichal
Copy link
Contributor Author

I'm going to close to this, but you can mention my repo in docs, I believe it's one of the first public repos which use new redux and react-router-redux. It practically do nothing, but people can see implementation and have some point where they can look if they loose traction :)

anyways, cheers 👍 and thanks

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