Closed
Description
Debugging components with the useSelector
hook is more complicated that it could be. In order to see a useSelector
return value, I have to put console.log
in my code or dive deep into the hook to find the internal useState
that stores the current selector value. React has a browser extension that shows inner state of React tree, components and hooks, and provides a way to attach a value to a hook in the extension UI:
The useSelector
hook may call useDebugValue
to show the current selected value next to the hook in the hooks list of the extension UI (like the built-in hooks do). It would be very handy.
I don't know whether using the hook impacts the performance. Using the hook only during development would be sufficient.
Metadata
Metadata
Assignees
Labels
No labels