3 ms·
We need articles like these because people don't understand that React is fundamentally an idempotent framework. The function component or render method, well,
by satvikpendem 4y ago
We need articles like these because people don't understand that React is fundamentally an idempotent framework. The function component or render method, well, renders every single time props or state change. Hooks are just a way to have some higher order state and if you think of React as UI = f(state), then the state variable also captures hook state as its input. It would be more clear to say UI = f(state, useState variable 1, useState variable 2, useEffect function 1, ...).