My React Component is rendering twice because of Strict Mode
问题 My React Component is rendering twice. So, I decided to do a line by line debug and the problem is here if ( workInProgress.mode & StrictMode) { instance.render(); } React-dom.development.js Is it because of strict mode? can I disable it? What is Strict mode? Do I need it? 回答1: StrictMode renders components twice (on dev but not production) in order to detect any problems with your code and warn you about them (which can be quite useful). If you have StrictMode enabled in your app but don't