Skip to content
APPCITORThe Tech Blog
Esc

Why Strict Mode on React? 100% explained

June 21, 2022 1 min read

react-strict-mode

When opening the index file you probably see this <StrictMode> tag. most of the developers simply remove the tag while developing the app. but, did you ever think why react comes with this tag.

Definition from the react website.

“StrictMode is a tool for highlighting potential problems in an application. Like Fragment, StrictMode does not render any visible UI. It activates additional checks and warnings for its descendants.”

As they mention, this is a good way to identify the issues while developing the application. But this tag will not contained in the production build.

When creating a react app it will wrap by this tag, but we can use this tag on anywhere in our application.

Let’s move to a practical example.

This example is simple explanation for react strict mode. I’ll cover all types of issues that can cover using this tag.

We can use this mode to identify several issues.

Thank you all.

Share this article

Keep reading