When using REDO once it doesn't apply the whole state. #66
Unanswered
balazskaloczi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I have a minor strange issue with the redo-s.
I implemented the library for a feature state, and it works flawlessly for the undo-s but when I’m using the redo the first redo action call updates only part of the previous state.
Also because the first redo doesn’t update the state, I can't go back to the state where I started from (before undo and redoing) because the first call removes a whole slice from the "undone" states but doesn't restore it.
When the redo action is called for the second time, it perfectly restores the last undo's state.
The first undo works perfectly, it updates both the sections and the isUpdateSectionsLoading.
The first redo only restores the isUpdateSectionsLoading state from the state history, which is not required.
Is there a way to only restore/store the "sections" state? I believe without watching the isUpdateSectionsLoading state it would work.
Should I write new actions where only the "sections" state is modified?
PS Really liked the description of the library and the technologies used.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions