The component is the essential part of React. With React you can build interactive and reusable components. In this recipe, you will create your first React component.
Creating our first React component
Getting ready
First, we need to create our React application using create-react-app. Once that is done, you can proceed to create your first React component.
Before you install create-react-app, remember that you need to download and install Node from www.nodejs.org. You can install it for Mac, Linux, and Windows.
Install create-react-app globally by typing this command in your Terminal:
npm install -g create-react-app
Or you can use a shortcut:
npm i -g create-react-app