What is the best practice for performing equality checks with the react-redux
useSelector
hook? Should you always use something like deepEqual
from react-fast-compare
when you are expecting a reference data type back to prevent unnecessary rerenders?
Example:
const myStateObj = useSelector(state => state.myStateObj, deepEqual)