Make API calls in componentDidMount
API calls should be made in componentDidMount instead of componentWillMount
Quote from React documentation:
componentDidMount() is invoked immediately after a component is mounted. Initialization that requires DOM nodes should go here. If you need to load data from a remote endpoint, this is a good place to instantiate the network request. Setting state in this method will trigger a re-rendering.