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

Function StatefulCounter

packages/react-devtools-shell/src/multi/left.js:20–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20function StatefulCounter() {
21 const [count, setCount] = useState(0);
22 const handleClick = () => setCount(count + 1);
23 return <button onClick={handleClick}>Count {count}</button>;
24}
25
26createRoot(createContainer()).render(<StatefulCounter />);

Callers

nothing calls this directly

Calls 1

useStateFunction · 0.90

Tested by

no test coverage detected