Rendering react component after api response
Changes: 1. Don’t do the api call inside render method, use componentDidMount lifecycle method for that. componentDidMount: 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 … Read more