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

Hooks API Reference uses misnamed type in the useSelector() example #2152

Closed
1 task
MayCXC opened this issue Apr 3, 2024 · 1 comment
Closed
1 task

Hooks API Reference uses misnamed type in the useSelector() example #2152

MayCXC opened this issue Apr 3, 2024 · 1 comment

Comments

@MayCXC
Copy link

MayCXC commented Apr 3, 2024

What version of React, ReactDOM/React Native, Redux, and React Redux are you using?

  • React:
  • ReactDOM/React Native:
  • Redux:
  • React Redux:

What is the current behavior?

The useSelector() example in the API Reference defines a type alias for SelectorFn, but then uses an undefined SelectorFunction type in place of SelectorFn.

What is the expected behavior?

The example should use the SelectorFn type that it defines.

Which browser and OS are affected by this issue?

No response

Did this work in previous versions of React Redux?

  • Yes
@EskiMojo14
Copy link
Collaborator

it's worth noting the example is "pseudo-Typescript", as are a lot of our API references. It's enough to get the point across, while not being actual functional Typescript.

making sure that a name used is consistent across the example makes sense, but don't expect the full example to match our actual types :)

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

No branches or pull requests

2 participants