initialState property

Map initialState

Invoked once before the Component is mounted. The return value will be used as the initial value of state.

Example:

// ES6 component
constructor() {
  this.state = {count: 0};
}

// Dart component
@override
get initialState => {'count': 0};

See: reactjs.org/docs/react-without-es6.html#setting-the-initial-state See: reactjs.org/docs/react-component.html#constructor

Implementation

Map get initialState => const {};