Skip to content

treshugart/react-dom-walker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

Find render roots, reverse engineer and walk the React node tree.

Resources

Stars

Watchers

Forks

Packages

No packages published