Why does this React component re-render twice, and how would you stop it?
Shown a component with a state update inside an effect. They wanted me to spot the dependency causing the loop, then talk through memoisation and when it is not worth it.
One moment
One moment
Real questions, real experiences, and what's changing in hiring — from people preparing for the same interviews you are.
Shown a component with a state update inside an effect. They wanted me to spot the dependency causing the loop, then talk through memoisation and when it is not worth it.
Be constructive. Foul language flags your account.
No answers yet
Be the first — the person who posted is waiting.