Perserve state on HMR with "setup" stores #2201
Unanswered
nicooprat
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
We have a "setup" store (so without any
state()
function) that handle the app configuration. When the file is edited, anyref()
indefineStore()
are reset to their initial empty values and completely break the app, making HMR useless in this case.I precise that we're using the "setup" way of creating store, so I guess this part of the docs doesn't apply:
What's the best way to handle this?
I tried to play a bit with
acceptHMRUpdate
without success. I didn't find any related discussion or issue neither.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions