Exocortex / redux-undo

:recycle: higher order reducer to add undo/redo functionality to redux state containers
MIT License
0 stars 0 forks source link

merging back into omnidan/redux-undo #1

Open Introvertuous opened 6 years ago

Introvertuous commented 6 years ago

This fork should be a PR back into the original repo, with updated unit tests for filtered actions (the changes made broke them).

Described Changes:

The changes are regarding filtered actions (excluded actions). When a filtered action is dispatched, the history is not modified in any way (no new entries or removed entries), which is how you would expect it to work. Although these actions can result in state changes, so the present state is updated with that change but all history entries (past / future) are not updated.

I feel like the expected behavior would be to update all state (present, past, future) when an excluded action is dispatched because otherwise the state change of the excluded action is reverted (the history does not have that state change) when you undo an unrelated action (the most recent non excluded action that was dispatched).

Introvertuous commented 6 years ago

This repository and the published npm (https://www.npmjs.com/package/exocortex-redux-undo) can be removed if / when the following PR is merged.

https://github.com/omnidan/redux-undo/pull/193