facebook / react-devtools

An extension that allows inspection of React component hierarchy in the Chrome and Firefox Developer Tools.
Other
11.04k stars 1.78k forks source link

React Dev Tools: useReducer content isn't displayed #1305

Closed jktravis closed 5 years ago

jktravis commented 5 years ago

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.

2019-02-16_20-05-13

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)

BTMPL commented 5 years ago

Duplicate of https://github.com/facebook/react-devtools/issues/1282

rudyhuynh commented 5 years ago

Duplicate of #1282

1282 is about useState(), which is resolved. This is about useReducer(), it is not duplicated.

bvaughn commented 5 years ago

1282 references 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).

katerlouis commented 5 years ago

@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–

bvaughn commented 5 years ago

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