CodePark/ questions / Performance: profiling & measuring
START PRACTICINGPRACTICE
Frontend question · React › Performance: profiling & measuring

In npm run dev, a teammate sees every component's console.log print twice and the app feels sluggish. What is the right conclusion?

StrictMode double-renders only in development, and dev builds are slower; measure a production build before optimising

StrictMode double-renders only in development, and dev builds are slower, so measure a production build before optimising. StrictMode calls component functions twice in development to expose impure rendering. Development builds also include extra checks that make them slower. Neither happens in a production build.

"There is a bug causing duplicate renders" is the tempting wrong answer. The double logs are expected in development. Removing
StrictMode would hide bugs without making production faster. React 19 does not always render twice either.