Skip to content

What's the best way to clear the tree and start fresh? #1798

Answered by jamonholmgren
1mike12 asked this question in Q&A
Discussion options

You must be logged in to vote

@1mike12 Good question! Easiest way is to do this in your RootStore:

// RootStore here
.actions((rootStore) => ({
  reset() {
    applySnapshot(rootStore, {})
  }
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jamonholmgren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants