-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Replay mode #140
Comments
This should be implemented in |
My suggestion would be to make the rendering itself not cause any side effects. A render is basically always triggered by a dispatch and having another dispatch triggered as a result of that seems wrong. Before you know it, you have a cascade of state mutations and / or side effects going off from a single dispatch and you'll lose track of which dispatch caused what. It will also make things hard to test. This problem is what made large Backbone applications hard to manage. React and Redux are designed to get away from that. In the Redux render loop there is only one event (change) and only one subscriber (React). To keep that contract for rendering intact, I would not trigger any dispatch in a life cycle method of React (or React Router). Instead, have a look at Redux Saga or something similar. |
Implemented in |
Looks great! Are you planning use the |
@zalmoxisus it would be great if we could import just an array of actions. the states should be reproducible and this way, we could save tracking data thats captured from elsewhere and replay exactly what happened. how does that sound to do? I'm happy to help! |
@amannn, there's a better way now to prevent side effects like those while time travelling. It will also help to lock changes for the us case of @ccorcos. See the post for details on how to get it. |
First of all, really great work on this extension! I use it almost daily when working on Redux apps.
I'm encountering an issue, when using the time travel feature of the dev tools. The problem mostly comes down to a view reacting to a state change and dispatching another action. The problem is pretty well described in issue 167 from redux-devtools.
I was wondering if this could somehow be solved by this extension?
I guess there should be some kind of replay mode that is entered when the action history is changed through the dev tools. As redux-devtools-extension is injected as a store enhancer, would it be possible to prevent new actions reaching the reducers? Otherwise, maybe a dev tools middleware could be added that has this behaviour?
Thanks!
The text was updated successfully, but these errors were encountered: