render method

  1. @override
dynamic render()
override

Examines props and state and returns a ReactNode.

This method is required for class components.

The function should be pure, meaning that it should not modify component state, it returns the same result each time it is invoked, and it does not directly interact with browser / DOM apis.

If you need to interact with the browser / DOM apis, perform your work in componentDidMount or the other lifecycle methods instead. Keeping render pure makes components easier to think about.

See: legacy.reactjs.org/docs/react-component.html#render

Implementation

@override
render() {
  ReactNode content = props.children;
  props.storesByContext.forEach((context, store) {
    content = (ReduxProvider()
      ..store = store
      ..context = context
    )(content);
  });
  return content;
}