MCPcopy
hub / github.com/BetaSu/big-react / App

Function App

demos/performance/memo.tsx:3–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useState, memo } from 'react';
2
3export default function App() {
4 const [num, update] = useState(0);
5 console.log('App render ', num);
6 return (
7 <div onClick={() => update(num + 1)}>
8 <Cpn num={num} name={'cpn1'} />
9 <Cpn num={0} name={'cpn2'} />
10 </div>
11 );
12}
13
14const Cpn = memo(function ({ num, name }) {
15 console.log('render ', name);

Callers

nothing calls this directly

Calls 1

useStateFunction · 0.90

Tested by

no test coverage detected