React(also known as Reactjs) is a library for building user interfaces. It was originally created by Facebook and has been around for 7 years now. It is maintained by Facebook and a community of individual developers and companies.
React is a library and not a framework, many few get this mixed up. The word library and framework means different things in a whole different contest.
However, React is only concerned with state management and rendering that state to the DOM, so creating React applications usually requires the use of additional libraries for routing, as well as certain client-side functionality.
Pre-requisites to learn Reactjs
Basic Javascript: You need to have a very sound knowledge of Javascript. You should have good knowledge of the following in JS;
Functions & Classes
- Variable Declarations
- Data Types
- Loops
- Conditional statement
- Objects
- Array
- High Order Functions
Why React?
Just like you know, The three layers of web development comprises; HTML, CSS, and Javascript. React is simply just javascript! Having a good understanding of Javascript make it easier for you to learn to react. This saves you from having to learn a new language or concepts.
By learning ReactJS, you can get to building mobile applications for iOS and Android using React Native.
Also, ReactJS applications are super easy to test.
Setting up a React Development Environment
You need to have a local development environment to create your react app, if you don't, you would need to install Node to your local machine. Visit nodejs.org
If you have Node installed already, you can check your current node version by typing the following command in your Command Prompt(Window) or terminal(Mac Os).
npm -v
Creating React App
To create react app
npm i -g create-react-app
then this
`create-react-app ApplicationName
One of the best approaches to installing React App is by using npx this allows you use the latest version of React available in your npx registry
npx create-react-app AppName
Conclusion
React is to be fast, scalable, and simple. React allows you to build scalable applications. You can integrate React into your existing program.