When the component is first mounted, this hook creates and returns a a new
long-lived @watchable/store!Store initialised with initialState.
In later renders the hook will always return the same Store, It
deliberately doesn't force a component refresh when the Store state changes.
Any changes to initialState after the first render are therefore ignored.
To track changes in the store, see useSelected or useRootState.
When the component is first mounted, this hook creates and returns a a new long-lived @watchable/store!Store initialised with
initialState
.In later renders the hook will always return the same
Store
, It deliberately doesn't force a component refresh when the Store state changes. Any changes toinitialState
after the first render are therefore ignored. To track changes in the store, see useSelected or useRootState.