Skip to content

Ignore Model Store Persistence ? #1815

Discussion options

You must be logged in to vote

Hey @RadouaneEzzaggab, thanks for the question!

You can ignore sections by editing this:

// track changes & save to storage
onSnapshot(rootStore, (snapshot) => storage.save(ROOT_STATE_STORAGE_KEY, snapshot))

Something like this (not tested):

  // track changes & save to storage
  onSnapshot(rootStore, (snapshot) => {
    // remove `someModel` from stored snapshot
    const { someModel, ...newSnapshot } = snapshot
    storage.save(ROOT_STATE_STORAGE_KEY, newSnapshot)
  })

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@RadouaneEzzaggab
Comment options

@RadouaneEzzaggab
Comment options

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
Converted from issue

This discussion was converted from issue #1812 on October 18, 2021 21:28.