Lifecycle Methods
This lesson briefly introduces the lifecycle methods that can be overridden in a React ES6 class component
We'll cover the following...
Now it’s time to get real with APIs and move past sample data. If you are not familiar, I encourage you to read my article on how I got to know APIs.
For our first foray into the concept, we will be using Hacker News, a solid news aggregator about tech topics. In this exercise, we will use the Hacker News API to fetch trending stories. There are basic and search APIs to get data from the platform. Search makes sense in the application that we are building in this course because we want to be able to search Hacker News stories. Visit the API specification to get an understanding of the data structure.
Lifecycle Methods
You may remember lifecycle methods were mentioned briefly in the last chapter, as a hook into the lifecycle of a React component. They can be used in ES6 class components, but not in functional stateless components. Besides the render()
method, there are several methods that can be overridden in a React ES6 class component. All of these are the lifecycle methods.
...