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

useSelector hook seems to break hook parsing in React Developer Tools #2142

Closed
1 task
kenlyon opened this issue Mar 13, 2024 · 2 comments
Closed
1 task

useSelector hook seems to break hook parsing in React Developer Tools #2142

kenlyon opened this issue Mar 13, 2024 · 2 comments

Comments

@kenlyon
Copy link

kenlyon commented Mar 13, 2024

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

  • React: 18.2.0
  • ReactDOM/React Native: 18.2.0
  • Redux: 4.2.1
  • React Redux: 8.0.1

What is the current behavior?

When I use the useSelector hook in my component, the Components tab of the React Developer Tools fails to parse the hooks:
image

Steps to reproduce:

  1. Install the React Developer Tools extension in Firefox.
  2. Open an app that contains a component that uses the useSelector hook.
  3. Open the Developer Tools and click on the "Components" tab.
  4. Select the component in the tree and look at the "hooks" section of the right panel.

What is the expected behavior?

I expect the React Developer Tools to be able to parse the hooks without error and show the names of the variables:

image

Which browser and OS are affected by this issue?

Firefox 123.0.1, WIndows 10 Pro

Did this work in previous versions of React Redux?

  • Yes
@timdorr
Copy link
Member

timdorr commented Mar 13, 2024

Looks like this is an upstream bug: facebook/react#27889

It may be fixed by React Dev Tools 5.0.1 or 5.0.2, either that or a uSES fix. Either way, it's not something we can fix ourselves.

@timdorr timdorr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@kenlyon
Copy link
Author

kenlyon commented Mar 14, 2024

@timdorr Thanks for the link to the relevant issue! I'm glad to see it's been fixed. Hopefully there will be a new release of the extension soon.

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