MCPcopy
hub / github.com/facebook/react / App

Function App

fixtures/devtools/scheduling-profiler/app.js:4–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2const {createRoot} = ReactDOM;
3
4function App() {
5 const [isMounted, setIsMounted] = useState(false);
6 useLayoutEffect(() => {
7 setIsMounted(true);
8 }, []);
9 return createElement('div', null, `isMounted? ${isMounted}`);
10}
11
12const container = document.getElementById('container');
13const root = createRoot(container);

Callers

nothing calls this directly

Calls 3

useStateFunction · 0.50
useLayoutEffectFunction · 0.50
createElementFunction · 0.50

Tested by

no test coverage detected