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

Function Hello

packages/react-refresh/src/__tests__/ReactFresh-test.js:419–426  ·  view source on GitHub ↗
({color})

Source from the content-addressed store, hash-verified

417 if (__DEV__) {
418 await render(() => {
419 function Hello({color}) {
420 const [val, setVal] = React.useState(0);
421 return (
422 <p style={{color}} onClick={() => setVal(val + 1)}>
423 {val}
424 </p>
425 );
426 }
427 $RefreshReg$(Hello, 'Hello');
428
429 const Outer = React.forwardRef(() => <Hello color="blue" />);

Callers

nothing calls this directly

Calls 2

$RefreshReg$Function · 0.70
setStateFunction · 0.50

Tested by

no test coverage detected