componentWillMount method

  1. @override
  2. @mustCallSuper
void componentWillMount()
override

ReactJS lifecycle method that is invoked once, both on the client and server, immediately before the initial rendering occurs.

If you call setState within this method, render will see the updated state and will be executed only once despite the state value change.

See: reactjs.org/docs/react-component.html#mounting-componentwillmount

Implementation

@override
@mustCallSuper
void componentWillMount() {
  if (inReactDevMode) {
    validateProps(props);
  }
}