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). Sometimes it can be confusing as you think it is a bug on your code.
Source