Careeroza
Why Components Re-render
Re-render Triggers
- Its state changes.
- Its parent re-renders (even if the props are the same!).
- A context it uses changes.
Usually re-rendering is cheap. It becomes a problem when a slow component (big table, chart) re-renders for an unrelated change.