You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Debugging components with the
useSelector
hook is more complicated that it could be. In order to see auseSelector
return value, I have to putconsole.log
in my code or dive deep into the hook to find the internaluseState
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 calluseDebugValue
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.
The text was updated successfully, but these errors were encountered: