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

Function Content

fixtures/ssr/src/components/App.js:13–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13function Content() {
14 let [CurrentPage, switchPage] = useState(() => Page);
15 return (
16 <div>
17 <h1>Hello World</h1>
18 <a className="link" onClick={() => switchPage(() => Page)}>
19 Page 1
20 </a>
21 {' | '}
22 <a className="link" onClick={() => switchPage(() => Page2)}>
23 Page 2
24 </a>
25 <Suspense fallback={<LoadingIndicator />}>
26 <CurrentPage />
27 </Suspense>
28 </div>
29 );
30}
31
32export default function App({assets}) {
33 return (

Callers

nothing calls this directly

Calls 1

useStateFunction · 0.90

Tested by

no test coverage detected