React · Junior · Question 34 of 75
Why does <StrictMode> call render and effects twice in development?
- 1To warm up the cache and speed up the first page load
- ✓Correct answer: To reveal impure renders and effects without cleanup
- 3It's a known React 18 bug; it's better to disable StrictMode
Explanation
The double call helps find side effects during render (mutations, requests) and missing cleanup in effects. It doesn't happen in the production build. If the double call breaks something, the code has a bug that will show up later anyway.