A simple set of utilities to convert DOM elements to React Fiber elements.
npm install @aliemir/dom-to-fiber-utils
Example App: https://dom-to-fiber-utils-example.vercel.app
Given a dom element, return the fiber associated with it.
Given a fiber, return the name of the component.
Given a fiber, return the parent fiber. Looks up the tree.
Given a fiber, return the first fiber with a state node. Looks up the tree.
Given a fiber, return the owner fiber.
Given a fiber, return the source of the component.
Given a fiber, return the nth parent of the fiber.
Given a fiber, return the dom element associated with it.
Given a fiber, return the first fiber with a name. Looks up the tree.
All PRs are welcome. This is a very simple set of utilities that I needed for a project. If you need more, please open an issue or a PR.