Zustand
10 rules in fabricahq/public-library
Create stores once, outside render
HIGHfabricahq/public-libraryDefine typed state and named actions
MEDIUM-HIGHfabricahq/public-libraryKeep each store focused on one domain
MEDIUMfabricahq/public-libraryKeep store state serializable
MEDIUMfabricahq/public-libraryPersist only safe, versioned state
HIGHfabricahq/public-libraryRehydrate persisted stores after React hydration
HIGHfabricahq/public-libraryReset stores between tests and test actions directly
MEDIUMfabricahq/public-librarySubscribe with narrow, stable selectors
HIGHfabricahq/public-libraryUpdate store state functionally and immutably
HIGHfabricahq/public-libraryUse Zustand only for shared client state
HIGHfabricahq/public-library