Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More informative error message for createSelector #350

Closed
RusinovAnton opened this issue Jun 21, 2018 · 1 comment · Fixed by #514
Closed

More informative error message for createSelector #350

RusinovAnton opened this issue Jun 21, 2018 · 1 comment · Fixed by #514

Comments

@RusinovAnton
Copy link

RusinovAnton commented Jun 21, 2018

I've just had a case when I misused createSelector by mistakenly passing resultFunc into array with inputSelectors.

createSelector([
  firstSelector,
  secondSelector,
  (firstParam, secondParam) => {
     ...
     return { ...derivedProps }
  },
])

And error message I had is bit confusing

resultFunc.apply is not a function

and it took me a while to define what exactly caused this error.

I propose to add error in case when resultFunc is not a function to make it more clearer to find and fix mistakes like this.

@RusinovAnton
Copy link
Author

Sad to see that such popular projects get abandoned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants