react-dom-walker
v1.0.1
Published
> Find render roots, reverse engineer and walk the React node tree.
Downloads
9
Maintainers
Readme
react-dom-walker
Find render roots, reverse engineer and walk the React node tree.
Install
npm i react-dom-walker
Usage
import { walk, findRoots, getDisplayName } from 'react-dom-walker';
const displayNames = [];
for (const root of findRoots(document.body)) {
walk(root, node => {
displayNames.push(getDisplayName(node));
});
}
// ['ComponentA', 'ComponentB']
console.log(displayNames);