LoaderΒΆ

Loader allows components to display a loader while they are fetching data. If you create a completely new component (it inherits either from Component or BaseComponent) then you can use it in this way:


class MyComponent extends BaseComponent {
  render(){
    return (
      <Loader isFeching={this.state.isFeching}>

      </Loader>
    );
  }
}

As soon as state.isFetching is true then all the components inside and will display.

If you are extending from the BaseComponent and using the fetchData property to fetch resources then the isFeching state is handled for you.

If you aren’t using fetchData to fetch resources then you need to switch this variable manually.