Skip to content

Conversation

@gshilin
Copy link
Contributor

@gshilin gshilin commented Mar 31, 2021

As discussed in #1704 added a couple of dev-only checks to useSelector to verify that both selector and equalityFn are functions

@netlify
Copy link

netlify bot commented Mar 31, 2021

Deploy preview for react-redux-docs ready!

Built with commit bd42e4a

https://deploy-preview-1706--react-redux-docs.netlify.app

}
if (typeof equalityFn !== 'function') {
throw new Error(
`You must pass a function as an equality function to useSelector`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not going to lie, I would love to add a little sass on this one:

Suggested change
`You must pass a function as an equality function to useSelector`
`You must pass a _function_ as an equality _function_ to useSelector...`

(Note, please don't merge this :P)

@timdorr
Copy link
Member

timdorr commented Mar 31, 2021

LGTM 👍

@timdorr timdorr merged commit df36f4e into reduxjs:master Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants