React is all about components. So let's build one.
You see that React components are defined using a regular JS object. Some properties and methods of the object such as render() have special meanings, the rest is upforgrabs.
A table is a way to neatly and orderly present some data. The data is front and center, the most important thing. And data is what you should focus on - retrieving, updating, saving, etc.
Once you have the data, you let React take care of the presentation part.
You want the UI to react to changes in the data. So you need a stateful component. Meaning one that has state. This is easier than it sounds.
As you can see the state is an object. Simple as that, the old familiar {key: value}situation. In this case the state is just one property of the state object, appropriately named data. ...
Your new post is loading...