Here is a custom hook that allows you to dispatch actions conveniently.
Recipe 2: useShallowEqualSelector()
Here, if useSelector() were used instead of useShallowEqualSelector(), repeated clicks on the RESET button would trigger re-rendering of the component as the state {value:0}!=={value:0}, ie. different memory reference.