I have two zustand stores, transcription and writing. The transcription store keeps…
Jump to turn (17)
- 1I have two zustand stores, transcription and writing. The transcription store ke
- 2can I nest one store inside of another?
- 3If I wanted to persist state to disk and later restore it, which approaches you
- 4should I replicate state from one store into another so that each one is self-co
- 5what is the observer pattern and how is it used in react?
- 6Now start with the problem I mentioned at the beginning, and reason step-by-step
- 7Here is my implementation of the transcription store. Analyze it - point out how
- 8now using your thoughts, choices and my implementation of the transcribe store,
- 9is it okay for zustand functions with setState to do other async things? I am no
- 10how is immer more performant?
- 11is it okay to mutate state in zustand? what are the dangers?
- 12Here is my partial writing store so far. Should I use immer? If so, update this
- 13is it possible to keep the actions outside the store state itself? I don’t want
- 14I mean that those references aren’t as stable as my original implementation. Bec
- 15what does it mean to pass in shallow to zustand use hook?
- 16how do I adjust a type to mark one property as non-optional?
- 17is it okay to use a zustand selector inside a useEffect? dumb question I know.
- User
I have two zustand stores, transcription and writing. The transcription store keeps track of transcriptions from speech to text from the user. The writing store takes these transcriptions (once the user completes their speech, and once the transcriptions are done) and sends them for processing and then stores the results.
Needless to say the two are connected. What are the best patterns and methods to do this? One way I was thinking was to use a react component (like a writing component) that watches changes to one store and the dispatches jobs and changes in the other. Another might be connecting the stores and having the second derive its state from the first one. What can you tell me?
- Assistant