Replies: 1 comment
-
I agree proxyWithHistory is limited in various ways. Hope someone to develop a third-party package with a nicer solution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
proxyWithHistory allow you to undo actions and return to a previous state. But one of the nice features of valtio is that you can compose proxies. Upon composing proxies history travel doesn't seem to work well. This could be helpful if you don't know on which proxy the latest action took place.
https://codesandbox.io/s/musing-bhaskara-xjgoy3?file=/src/App.tsx
I guess at the moment history travel only works on atomic proxies? (the composed proxy breaks after first undo).
Beta Was this translation helpful? Give feedback.
All reactions