Introduction
In this article, I will guide you with the process of getting started with React.js.
React is a front-end library that is responsible for the user interface. It is neither a whole framework nor a language. It is an open-source JavaScript library for building the UI (user interface) of an application.
Why React
React is declarative, flexible, and easy to learn. React is maintained by Facebook and a community of individual developers. Currently, there is a great demand for React.js in the industry.
React can be used for the development of single-page applications or mobile applications. For complex applications, React uses additional libraries for state management, routing, and interaction with an API.
React allows us to compose complex UIs by writing a small piece of code. An isolated piece of code is called Component.
Prerequisites of React
You should have knowledge of HTML, CSS, and JavaScript fundamentals.
You should also be aware of ES6.
Technical requirement
You should have node.js installed on your computer. If not installed, then visit
here.
For writing the code, we prefer to use the Visual Studio Code. You can download the Visual Studio Code from
here.
After the successful installation of node.js, you can use the create-react-app generator to create the React application. To install the create-react-app generator, execute the following command in terminal or command prompt.
npm install -g create-react-app
Now, to create a React app, we use the following command in the terminal.
Create-react-app test_app
Here, test_app is the name of the folder of your application. This may take a few minutes to create the React application. It will also install its dependencies.
Summary
In this article, we went through some basics of React.js, its features, and its prerequisites. In the next article, we will review the folder structure created by the create-react-app generator and our first demo application.