MCPcopy
hub / github.com/pmndrs/react-three-fiber / findInitialRoot

Function findInitialRoot

packages/fiber/src/core/utils.tsx:22–26  ·  view source on GitHub ↗
(instance: Instance<T>)

Source from the content-addressed store, hash-verified

20 * Returns the instance's initial (outmost) root.
21 */
22export function findInitialRoot<T>(instance: Instance<T>): RootStore {
23 let root = instance.root
24 while (root.getState().previousRoot) root = root.getState().previousRoot!
25 return root
26}
27
28export type Act = <T = any>(cb: () => Promise<T>) => Promise<T>
29

Callers 4

removeChildFunction · 0.90
swapInstancesFunction · 0.90
utils.test.tsFile · 0.90
applyPropsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…