I am trying to traverse through React Component Tree( or somehow get access to all components) and create my own custom UI inside the browser(most likely an extension) to manipulate different components.
this is my code:
// const root_node = root._internalRoot.current;
const root_node = document.getElementById('root')
const renderer = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.renderers.get(1);
const rendered_root_node = renderer.findFiberByHostInstance(root_node);
But it's returning null. I tried using findHostInstanceByFiber as well.
Is there any way to traverse through the components in the browser?