Undo Redo manager with mobx-utils deepObserve
#3281
steveruizok
started this conversation in
Show and tell
Replies: 2 comments 3 replies
-
Ah I've run into a snag: like observe, deepObserve does not respect transactions, meaning that a change that effects multiple properties will trigger multiple "undos". We can debounce the deepObserve's listener, but this means the undo/redo will no longer be synchronous! Here's a sandbox showing what this looks like: https://codesandbox.io/s/mobx-undo-redo-v3-vx2oo |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks to @urugator, here's a new version that runs synchronously: https://codesandbox.io/s/mobx-undo-redo-v4-mwyi6 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all, I saw that undo redo has come up a few times in the issues. I was looking for a solution and couldn't find one, so here's what I came up with: https://codesandbox.io/s/mobx-undo-redo-v2-ofty1 . I'd love to hear any thoughts on improving it, or if you have any similar solutions that I could look at!
Beta Was this translation helpful? Give feedback.
All reactions