Re -render happens when React needs to update the app with new data. Preventing re-renders with composition is an anti-pattern that can be the biggest performance killer. On every re-render React will re-mount this component (i.e. destroy it and re-create it from scratch), which is going to be much slower than a normal
Table of contents
What is re-render in React?When React component re-renders itself?Preventing re-renders with compositionPreventing re-renders with React.memoImproving re-renders performance with useMemo/useCallbackImproving re-render performance of listsPreventing re-renders caused by Context18 Comments
Sort: