[Feature] Component-level REPL
Closed this issue · 2 comments
Now with hooks especially, it would be nice to have a component-level REPL. Once you've inspected on a component, I could see a small area at the bottom that works much like the current console.
In there you could "test out" hooks. I understand this would be a bit weird in that it would break the static ordering you typically expect, but at least in my very brief use of the new hooks inspector, it would feel a bit more intuitive. I could attach context, see some values, pass those into a hook I want to test, etc.
We plan to build a more complete interface for inspecting and interacting with hooks– (by which I mean updating useState
values– probably nothing else)– at some point in the near future, but I don't think it would work like what you describe.
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