Given a state, produces a sub state. Should be pure. A selector returning something new even when state does not change will create infinite loop.
The store to watch for state changes.
Optional options to customize the way the selected result is handle.
Access store state.
Pass optional options to customize the way the selected result is handle.
The store to watch for state changes.
Optional options to customize the way the selected result is handle.
Generated using TypeDoc
Access store state and apply given selector.
import React from 'react'; import { useSelector } from 'store-react';
import { store } from './store';
export const Component = () => { const message = useSelector(state => state.message, store);
return