Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| const Component: React.FC = ({ listOfItems,first,second }) => { | |
| const list = useMemo( | |
| () => listOfItems.map(item => ({ | |
| ...item, | |
| itemProp1: expensiveFunction(first), | |
| itemProp2: anotherPriceyFunction(second) | |
| })), | |
| [listOfItems] | |
| ) |
| const Component = () => { | |
| const exampleCallback = () => console.log('You clicked'); | |
| return ( | |
| <main> | |
| <button onClick={exampleCallback}>Rerender component</button> | |
| </main> | |
| ) | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.