Unique key to identify the store.
Optional
value: ValueType<T>Initial value of the store.
Optional
plugins: Plugin<T>[]Plugins to be applied to the store.
Do not initialize the store. Useful when you want to initialize the store later. Note that the setter function is not available until the store is initialized.
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.Example