Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Avoid re-render when user settings haven't changed for FilterPro…
…vider The behavior of `useSelector` and `connect` is differently. `useSelector` uses identity comparison `===` for detecting if the returned object has changed and a re-render is necessary and `connect` uses shallow comparison. See https://react-redux.js.org/api/hooks#equality-comparisons-and-updates for all details. Therefore to avoid re-renders in the FilterProvider we need to compare the contents of returned array from the user settings selector via `shallowEqual` because with every call a new array is created and the identity changes.
- Loading branch information