Why React Renders? 😱
React, in its purest form, is a library for building user interfaces. It's so simple that the entire mental model can be represented as a formula, v = f(s) – where your view is simply a function of your state.
If this doesn’t help you understand React rendering, nothing will.
Read the article here: https://ui.dev/why-react-renders