examples/opta-mern-stack/client/src/components/recordList.js
// This method will get the data from the database.
This method will get the data from the database.
This method will get the data from the database .
componentDidMount() {
    const api_endpoint =Config.API_ENDPOINT;
    axios
      .get(api_endpoint +"/record/")
      .then((response) => {
        this.setState({ records: response.data });
      })
      .catch(function (error) {
        console.log(error);
      });
  }
componentDidMount ( ) { const api_endpoint = Config . API_ENDPOINT ; axios . get ( api_endpoint + "/record/" ) . then ( ( response ) => { this . setState ( { records : response . data } ) ; } ) . catch ( function ( error ) { console . log ( error ) ; } ) ; }
This method will get the data from the database.
This method will get the data from the database .