Zustand State Manager - real-world examples
-
I've watched a couple of videos, but they are very simple examples whose most complicated sample is incrementing/decrementing a counter. Dose anyone have a real-world use case taht can comment on it's functionality?
@realJSOP said in Zustand State Manager - real-world examples:
I've watched a couple of videos, but they are very simple examples whose most complicated sample is incrementing/decrementing a counter. Dose anyone have a real-world use case taht can comment on it's functionality?
Sure. How about the openai-responses-starter-app from OpenAI? Here is one example: useConversationStore.ts
-
@realJSOP said in Zustand State Manager - real-world examples:
I've watched a couple of videos, but they are very simple examples whose most complicated sample is incrementing/decrementing a counter. Dose anyone have a real-world use case taht can comment on it's functionality?
Sure. How about the openai-responses-starter-app from OpenAI? Here is one example: useConversationStore.ts
@Graeme_Grant said in Zustand State Manager - real-world examples:
@realJSOP said in Zustand State Manager - real-world examples:
I've watched a couple of videos, but they are very simple examples whose most complicated sample is incrementing/decrementing a counter. Dose anyone have a real-world use case that can comment on it's functionality?
Sure. How about the openai-responses-starter-app from OpenAI? Here is one example: useConversationStore.ts
I'm old - I don't use AI to write code.
-
@Graeme_Grant said in Zustand State Manager - real-world examples:
@realJSOP said in Zustand State Manager - real-world examples:
I've watched a couple of videos, but they are very simple examples whose most complicated sample is incrementing/decrementing a counter. Dose anyone have a real-world use case that can comment on it's functionality?
Sure. How about the openai-responses-starter-app from OpenAI? Here is one example: useConversationStore.ts
I'm old - I don't use AI to write code.
@realJSOP said in Zustand State Manager - real-world examples:
I'm old - I don't use AI to write code.
You miss the point that I was making. It's not about the AI, it's a real-life example of how it can be used.
-
I've tried watching a dozen or so videos, and none of them go any further than the basic examples provided by zustand. I'm trying to understand the slices pattern because it allows different stores to share data, but I can't find anything that actually explains it.
-
Turns out I don't need to use slices.
I had a couple of contexts and I've converted them to Zustand, and it allows a much smaller code footprint per store than the associated context.
@realJSOP said in Zustand State Manager - real-world examples:
I had a couple of contexts and I've converted them to Zustand, and it allows a much smaller code footprint per store than the associated context.
It looks like Zustand is growing on you...
-
@realJSOP said in Zustand State Manager - real-world examples:
I had a couple of contexts and I've converted them to Zustand, and it allows a much smaller code footprint per store than the associated context.
It looks like Zustand is growing on you...
@Graeme_Grant - It's certainly less chaotic than the react context api...