Generated using TypeDoc
I have built wonderful libraries utilizing React18 features using Zustand. They worked awesome. However, when I try importing from specific folder for better tree-shaking, the libraries fail. This is because, for each import a separate zustand store is created. This actually increases the package size also.
Thus, I decided to create a bare minimum, ultra-light store that creates shared state even while importing components from separate files for better treeshaking.
✅ Full TypeScript Support
@@ -48,4 +48,4 @@Licensed as MIT open source.
with 💖 by Mayank Kumar Chaudhari
Generated using TypeDoc
with 💖 by Mayank Kumar Chaudhari
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Use this hook similar to
useState
hook. +- Preparing search index...
- The search index is not available
Code DocumentationFunction default
Use this hook similar to
useState
hook. The difference is that you need to pass a unique key - unique across the app to make this state accessible to all client components.Type Parameters
Parameters
Optional
value: TReturns [T, ((val) => void)]
Example
-Settings
Member Visibility
Theme
Generated using TypeDoc