Skip to content

Update jsdocs for hooks #1295

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

Merged
merged 2 commits into from
May 26, 2019
Merged

Update jsdocs for hooks #1295

merged 2 commits into from
May 26, 2019

Conversation

trappar
Copy link
Contributor

@trappar trappar commented May 25, 2019

useSelector: Not having the second argument be optional in the jsdoc is making my IDE complain "Invalid number of arguments, expected 2"

useDispatch: My IDE sees this {any} return value and doesn't assume it can be called. I get "Method expression is not of function type". Suggesting it might be a function seems safe enough.

@netlify
Copy link

netlify bot commented May 25, 2019

Deploy preview for react-redux-docs ready!

Built with commit 5328a55

https://deploy-preview-1295--react-redux-docs.netlify.com

@trappar trappar changed the title Make second argument to useSelector optional Update jsdocs for hooks May 25, 2019
@markerikson
Copy link
Contributor

What IDE are you using?

@trappar
Copy link
Contributor Author

trappar commented May 25, 2019

Webstorm. This will be the case in all IntelliJ IDEs though.

@markerikson
Copy link
Contributor

Okay, seems reasonable.

@markerikson markerikson merged commit 7db3bfd into reduxjs:v7-hooks-alpha May 26, 2019
timdorr pushed a commit that referenced this pull request May 30, 2019
* Make second argument to useSelector optional

* Update useDispatch jsdoc return
timdorr pushed a commit that referenced this pull request Jun 11, 2019
* Make second argument to useSelector optional

* Update useDispatch jsdoc return
albertodev7 pushed a commit to albertodev7/react-redux that referenced this pull request Dec 8, 2022
* Make second argument to useSelector optional

* Update useDispatch jsdoc return
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