100% React Rendering, Avoid Wasted Renders
https://www.youtube.com/watch?v=oAQ5vavDupU&list=PLsZlhayVgqNwHNHeqpCkSgdRV08xrKtzW&index=4
const MyComp = params => {
const renderCountRef = useRef(1);
return (
<>
<b>({renderCountRef.current++})</b> {params.value}
</>
);
};
cellRenderer: memo(MyComp)
No comments:
Post a Comment