Life cycle hooks are getting called twice

Whne I start my react app,
constructor() , getDerivedFromProps() and render() method are getting called twice and componentDidMount is getting called once.
Shouldn’t all of them are getting called once in the mounting phase?

react lifecycle

The life cycle hooks are being called twice because in React strict mode <React.StrictMode /> the side effects executed twice.So if you unwrap your <App /> component from <React.StrictMode> in index.js file it’ll work fine.