Closed
Description
It seems like the library is currently hardcoded to compare the value produced by the selector using Object.is
use-context-selector/src/index.js
Line 82 in ba7476a
Sometimes it may be useful to use a different equality comparison such as shallow equal when composing an object. The redux useSelector
API has an extra optional parameter for this purpose, which can be used like
const selectedData = useSelector(selectorReturningObject, shallowEqual)
Would you consider supporting this in use-context-selector?
Metadata
Metadata
Assignees
Labels
No labels