mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 13:52:36 +00:00
src/utils - Add getRootFiberNodeFromDOM helper
To find root Fiber node from overall html document or a particular element. Ideally, this should be called with the same container element used in ReactDom.render.
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface FiberNodeDOMContainer extends Element {
|
||||
_reactRootContainer: {
|
||||
_internalRoot: {
|
||||
current: FiberNode | null;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type FiberNode =
|
||||
| FiberNodeForComponentClass
|
||||
| FiberNodeForFunctionComponent
|
||||
|
||||
Reference in New Issue
Block a user