Search code examples
reactjsgoogle-chrome-devtoolsreact-devtools

React chrome developer tools component selector?


Is there a way to select a component in react developer tools chrome extension and have further operations on it in the console of chrome? I only found the DOM selector which navigates to the elements tab of chrome developer tools. enter image description here

Just like there is a component selector appears in Vue developer tools, where you can select a component and then you can access it in the console with $vm0 variable. Same if I try with react, it gives this error in the console when I select the App component:

VM560:1 Uncaught ReferenceError: $vm0 is not defined
    at <anonymous>:1:1

Is that missing in the react chrome developer tools?


Solution

  • I am able to select the component with $r