Member-only story

What is StrictMode in React

Everything you need to know about React.StrictMode

Shubham Khatri
Better Programming
8 min readMay 4, 2021

Coffee with latte art
funPhoto by Toa Heftiba on Unsplash.

Often when I look back at a piece of code I wrote long ago, I think that I could have written it 100 times better. I am sure I am not the only one in this boat. As we gain more experience, we constantly evolve our coding practices and design patterns. This is the case with React too.

React also has gone through a lot of transitions, and as it has progressed, certain practices that were believed to be good in the past are no longer fit for the future roadmap. One significant change happened with the release of v16 where it went through a re-write onto React Fiber’s architecture. The major focus was on scheduling (i.e. deciding when a piece of work should be performed while keeping in mind the priorities of different tasks such as animations, UI updates, and so on).

At about the same time, a new Context API was added in React.

Also, with the goal of providing Concurrent Mode in future versions where the rendering phase is split into multiple parts, a lot of change has come about. The start of it saw the introduction of React Hooks, deprecation of certain lifecycle methods, and more.

In this article, we will look at all the deprecated patterns that StrictMode in React helps us to identify.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Already have an account? Sign in

Shubham Khatri
Shubham Khatri

Written by Shubham Khatri

Software Engineer at Meta | Passionate about Javascript, React and Web Development | Active Stackoverflow contributor

No responses yet

What are your thoughts?