Best practice for persisting state #1902
Unanswered
stefanfrede
asked this question in
Q&A
Replies: 2 comments 2 replies
-
|
If you want to implement caching strategies and when you have short-lived machines then you should externalize the cache - I would probably handle it in your |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I think there are confusing & conflicting therms with XState; |
Beta Was this translation helpful? Give feedback.
2 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I started to try to wrap my head around XState.
With the help of some screencasts and going through the docs I managed to setup a fetch machine.
In my playground I grab some data in one component and based on that data I grab additional data in another component.
Now I would like to persist my data so that once I have it I don't fetch it again. And with that I somehow struggle.
I tried to persist and rehydrate the state but that was only working in one componet (in the component where I fetch the cover art I got errors).
At the moment my idea is to set up some kind of additional store (vuex or just a plain old object) where I add my results and check before fetching if my results are existing.
Is this a good idea? Or to return back to my subject, what would be considered the best practice to persist my state with XState?
Any push in the right direction is much appreciated!
Because I find it quite difficult to figure out how to best setup XState in a project it would be awesome if someone could additionally point me somewhere where I can figure this out.Should have taken a look at the resources before.Thanks a ton in advance!
Beta Was this translation helpful? Give feedback.
All reactions