applySnapshot when the model is using a preprocessor #1736
-
I have a model that uses a preprocessor to initialize its state and it isn't re-hydrating when I try to apply a snapshot |
Beta Was this translation helpful? Give feedback.
Answered by
jamonholmgren
Jul 12, 2021
Replies: 1 comment 1 reply
-
@aqrojo You have to map the values the same way you did the first time. Here's how that works: https://codesandbox.io/s/optimistic-borg-z79gm?file=/src/index.js |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jamonholmgren
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@aqrojo You have to map the values the same way you did the first time. Here's how that works:
https://codesandbox.io/s/optimistic-borg-z79gm?file=/src/index.js