-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Filtered actions are inconsistent when followed by unrelated action dispatches #215
Comments
I have a similar issue that can be seen here:
full steps to reproduce:
@mrcoles did you find a work around for this? |
If anyone is reading this, seems like using |
This is the expected behavior. See #173. As an example, imagine the unfiltered As @HarelM mentioned, you should use a whitelist filter like |
See this gist.
I noticed that filtered actions in redux-undo behave inconsistently when followed by actions that do not affect the state (tested in the 1.0.0 beta 9.9.7).
Run the example code in this gist via:
and then open the server it starts and view the developer JS console.
The action
TOGGLE_FOO
is supposed to get filtered. However, by dispatching the__DOES_NOT_CHANGE_STATE__
action, the state does actually change—it seems that _latestUnfiltered updates. Then after dispatchingTOGGLE_BAR
followed by an undo, it only undos theTOGGLE_BAR
and we are left with theTOGGLE_FOO
as if it were not filtered.As a contrast, if you comment out the does not change state action dispatch, the single undo undoes both the
TOGGLE_BAR
andTOGGLE_FOO
.The text was updated successfully, but these errors were encountered: