When is the static getDerivedStateFromProps() method called during mounting?
The static getDerivedStateFromProps() method is called after the constructor but before the render method during the mounting phase. It's a static method that receives props and state as parameters and returns an object to update the state or null to indicate no state update is necessary.