To make my intention clearer, I plan to build a guidance tool for our web application. For this, I want to control the app from the DOM without any access to the compiled ReactJS code.
IMHO this is a bad idea/requirement, not actual since 'react era' ;)
I did some POC with comments system build in. There was many tooltips-like elements filled with instructions and explanations (about options and possibilities).
Adding these texts was as simple as inserting component in render and set optional styling (position, alpha). They are set just in place, not externally referenced (keeping up to date) - better consistency, easy management. I even used i18next to have texts consistent with localised view.
I can show/hide all of them by global flag. They aren't really integrated, not interfering normal operations. You can 'remove it completly', changing component definition (globally, always render nothing) not touching places where it was used. Null renders to nothing in real DOM - virtual structures are cheap. Opposite change - extend with more complex actions (feedback/help options, remote assist) - is easy, too.
It will work the same way for react native.
Beside this in 'commented mode' I highlighted some component's borders to show structures.
Internal vs external? for own app? 10:2? ;)