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

Function onClick

packages/react-dom/src/__tests__/ReactDOMFiber-test.js:1301–1303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1299 const [reverse, setReverse] = React.useState(false);
1300 const [items] = React.useState(() => ['a', 'b', 'c']);
1301 const onClick = () => {
1302 setReverse(true);
1303 };
1304
1305 // shuffle the items so that the react commit needs to restore focus
1306 // to the correct element after commit

Callers 1

CounterFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected