Loading …
Explore how to create a reusable Loading component and use state management in React class components to show a loading message during asynchronous API requests. Understand conditional rendering to display loading indicators or fetch buttons in a Hacker News app scenario.
Displaying a Loading message
Now we get back to the application, where we’ll show a loading indicator when a search request submits to the Hacker News API. The request is asynchronous, so you should show your user feedback that something is happening.
Defining the Loading component and state property
Let’s ...