2

I have a Chrome Extension that is active on a React-based website that I do not control. This site has elements that are rendered as plain HTML with no identifying properties in what I can inspect, but when clicked they load specific items by their ID.

I have the React Developer Tools Chrome Extension installed also, and here I can dig into that Component and see the props and hooks for it, including an "id" and other values in the props.

Is it possible to access these React props from outside of React, using plain Javascript, like via a querySelector element reference? I have never built anything with React, so the framework is still a bit fuzzy for me in terms of how it all works and how something like that could be accessed.

Thanks!

ItJustWerks
  • 551
  • 6
  • 20
  • I think this question is similar, not a pure duplicate, but I'm wondering if its answers might at least be inspiration for what you're looking for. I can't say for sure so I'm not submitting this as the actual answer. https://stackoverflow.com/questions/29321742/react-getting-a-component-from-a-dom-element-for-debugging – Michael Flores May 10 '22 at 03:19

0 Answers0