3

I want to get the Fiber node in Hook,But don't know how to ?

import React from 'react';

export default function App() {
  // get the FiberNode in this Component
  return <div></div>;
}
Thomas.lin
  • 430
  • 1
  • 5
  • 11

1 Answers1

2

I found the way, document.getElementById("root")._reactRootContainer._internalRoot.current

Thomas.lin
  • 430
  • 1
  • 5
  • 11