What is Reactjs?
React.js builds user interfaces for single-page web apps by dividing the UI into composable elements. React.Js is a UI library, that was originally developed as an in-house library for Facebook, and then it was later open-sourced in 2013. It’s famous and mostly used for a multitude of reasons.
Why we should learn Reactjs?
- Learning Curve – which is basically non-existent.
- Speed of React itself
1. Learning Curve:
React has best communities out there. Good Tool with bad community equal to bad experience. when you have good tool with great community it’s a great developer experience.
So if you have any questions stackoverflow has answers.
We don’t to waste time building up really core things.
Facebook, Netflix, Uber, Walmart they are making heavy investments in react and the ecosystem and it’s getting better every single day.
You have libraries that can get those common things done like date pickers and so on.
3.Speed of React itself:
A component is a just piece of your UI render five or six components to the screen and you have a complete to the screen and you have a complete site.
This is a component based architecture makes better bigger production apps easy. Bigger apps break it up into bunch of little pieces.
Those little pieces are re-usable easy to build and easy to de-bug.
React renders, re-render the application very quickly.
When we change anything in the js file, the latest data will shown automatically to the user.
They are really very fast.
How to setup Machine?
There are few things we have to install & configure. Once we have those in place, we will actually be ready to write with react code.
Text Editor Setup: Sublime, Microsoft Visual Studio
Prerequisite for react js:
How does React Work?
React creates virtual DOM in memory.
React only changes what needs to be changed.
Installing Nodejs and yarn or npm.
We have to install two tools Nodejs and yarn or npm..
We will be using these two tools extensively throughout the tutorial.
Download Nodejs Setup file from https://nodejs.dev/
Download yarn from yarnpkg.com
What is Node?
We will be creating prod web server.
Check node -v to check the node version.
npm and yarn both will be aiming to get the same job done.
Getting Started: Installing React
First, go to the terminal and then type,
sudo npm install -g yarn
make sure that you has valid versions.
Now we all done with the setup.
we will learn how to setup webserver and JSX in the next tutorial