Skip to content

useStoreSelector

View as Markdown
function useStoreSelector<T>(selector): T;

Defined in: react/src/hooks.ts:43

Subscribes to one slice of the store. The selector must return a value that is referentially stable while the slice is unchanged (a stored field, not a freshly built object).

Type Parameter
T
Parameter Type
selector (s) => T

T