Closed jktravis closed 5 years ago
Duplicate of #1282
useState()
, which is resolved. This is about useReducer()
, it is not duplicated.useState
but both issues are the same. DevTools does not currently show object or array values in hooks. This will remain the case until we release the version 4 DevTools (which you can see a demo of here if you're curious).@bvaughn, I know that ETA questions are just pure evil, but I need some ballpark-number to decide if my team should even use hooks right now–
React DevTools has been rewritten and recently launched a new version 4 UI. The source code for this rewrite was done in a separate repository and now lives in the main React repo (github.com/facebook/react).
Because version 4 was a total rewrite, and all issues in this repository are related to the old version 3 of the extension, I am closing all issues in this repository. If you can still reproduce this issue, or believe this feature request is still relevant, please open a new issue in the React repo: https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools
Crosspost at react
Do you want to request a feature or report a bug? Bug
What is the current behavior? Using
useReducer
with an object as state doesn't show the content of the object and is un-expandable.Using a state with a string will show.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
https://q8yzo2z1mj.codesandbox.io/
What is the expected behavior? Expect the contents be expandable as with objects and arrays from traditional state.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? React: 16.8.2 DevTools: 3.6.0 Chrome: 72.0.3626.109 (Official Build) (64-bit)