facebook/react-devtools

How to launch react dev tool from other chrome extension.

casamia918 opened this issue · 2 comments

Hi. I'm trying to develop a chrome extension that manipulate react component's state of a specific websites.

I know that, after I installed react-dev-tool, and launch it, I can use $r object to access react component at console, as the react-dev-tool inject $r object into global variable.

https://stackoverflow.com/questions/29155044/how-do-you-inspect-a-react-elements-props-state-in-the-console

My problem is... As normal users doesn't familiar to launch react dev tools and run scripts at console, I want to encapsulate these steps by chrome extension.

But I can't find the way to launch react-dev-tool in other chrome extension.

Anybody knows it?

What you are describing does not sound like a supported way of using the DevTools package. Accessing the $r variable would only allow you to read a component's props/state, not modify them.

Closing this for now as it does not sound like something we want to support. We can continue to chat on the closed issue though.