Add the root HTML tag for appending the content, using JSX.
JSX content is written inside the script tag, which is of the type text/babel. Babel plugin helps the code to be executed on the Browsers.
Create the class with custom name, using React.Component method. Class should contain a constructor, which has super() method declared. Set the state container with the necessary variables. In this sample, list name, descriptions, template ID and items count are stored.
Since the data needs to be rendered on the page load, one of the life cycle methods is used to retrieve the list information and set it into the state variables. In this sample, the data is retrieved asynchronously. Thus, componentDidMount method is used. The custom function is created for retrieving the list information.