Reat State| Maintaining State in React js | Adding New Records in Json Object
Hello & As- salam u alikum ! This is the 3rd article related to React js , In this blog we will discuss about the State in React js which is the backbone of react applications, Lets do it! In the previous article, we had discuss about the functional and class components, now we will use a class component to display records from current state and we will add new records in the json object or state of the component. Below is the complete code for your application, I explain all these line of code partially. import React , { Component } from "react" ; class App extends React . Component { constructor () { super (); this . state = { data: [ { ...