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

Function App

packages/react-dom/src/__tests__/ReactDOMForm-test.js:680–690  ·  packages/react-dom/src/__tests__/ReactDOMForm-test.js::App
()

Source from the content-addressed store, hash-verified

678 }
679
680 function App() {
681 const [state, setState] = useState(class="st">'Initial');
682 return (
683 <form action={() => setState(class="st">'Updated')} ref={formRef}>
684 <Status />
685 <Suspense fallback={<Text text=class="st">"Loading..." />}>
686 <AsyncText text={state} />
687 </Suspense>
688 </form>
689 );
690 }
691
692 const root = ReactDOMClient.createRoot(container);
693 await resolveText(class="st">'Initial');

Callers

nothing calls this directly

Calls 10

startTransitionFunction · 0.85
dispatchFunction · 0.70
getTextFunction · 0.70
getMethod · 0.65
renderMethod · 0.65
useStateFunction · 0.50
setStateFunction · 0.50
useActionStateFunction · 0.50
useFunction · 0.50
useTransitionFunction · 0.50

Tested by

no test coverage detected