We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bb6a26 commit 6ec7d74Copy full SHA for 6ec7d74
README.md
@@ -468,9 +468,9 @@ shouldComponentUpdate(nextProps: Props, nextState: State) {
468
If you memoize your children, you can take advantage of this, and reap faster rerenders. For example:
469
470
```js
471
-function MyGrid() {
472
- const children = React.useMemo((count) => {
473
- return new Array(count).fill(undefined).map((val, idx) => {
+function MyGrid(props) {
+ const children = React.useMemo(() => {
+ return new Array(props.count).fill(undefined).map((val, idx) => {
474
return <div key={idx} data-grid={{x: idx, y: 1, w: 1, h: 1}} />;
475
});
476
}, [props.count]);
0 commit comments