Getting started
Last updated
Last updated
zustand is an amazing library that keeps state management as simple as you would have always loved it to be. zfy has been built on top of it to provide a useful set of tools to make that experience even more delightful.
Fully typed with TypeScript
Standardized access/update API backed by Immer
Ability to manage & consume multiples stores at once
Simple API for store creation with custom middlewares
Out-of-the-box persist gate component & rehydration hook
Logger, persist & subscribe middlewares available via a simple flag
Create your stores
As you can imagine: major thanks to the team of contributors behind zustand for such an amazing library! zfy also exists thanks to the folks working on Immer who made it so easy to deal with immutable state updates.
2. Rehydrate your data if needed
3. Bundle your stores as you please
4. Use the bundled/individual stores in your components
5. Update your data immutably (thanks to Immer) from wherever
6. Reset it all once your user is done