React › Strict Mode & Concurrent Features
What is React Strict Mode and what does it actually do?
BeginnerAnswer
Strict Mode is a development only tool that helps find potential problems in your app early, before they cause real bugs. It does not render anything visible itself, but it intentionally runs certain functions twice during development, like component bodies and some effects, to help surface code that accidentally relies on something being run only once.
import { StrictMode } from 'react';
function App() {
return (
<StrictMode>
<MainApp />
</StrictMode>
);
}Real-world example A team wraps their entire app in Strict Mode during development, which helps them catch a bug where a component was accidentally causing a side effect directly during rendering, something that would have been much harder to notice otherwise.