What's the best way to clear the tree and start fresh? #1798
-
Sometimes I'm changing things about the model definitions and the old state is stale and causing errors and I want to start the app from scratch. Is there something I can do to flush the old tree? |
Beta Was this translation helpful? Give feedback.
Answered by
jamonholmgren
Oct 22, 2021
Replies: 1 comment
-
@1mike12 Good question! Easiest way is to do this in your RootStore: // RootStore here
.actions((rootStore) => ({
reset() {
applySnapshot(rootStore, {})
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jamonholmgren
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@1mike12 Good question! Easiest way is to do this in your RootStore: