In this article, today we will discuss about a very simple demo in react js. So let’s proceed.
What is node.js ?
Install it from its official site. Once nodejs is installed, npm is installed automatically. So now what is npm?
React is a Javascript UI library developed by Facebook to create interactive, stateful & reusale UI components. Instagram is written completely in React.
One of it's unique feature is that it not only does its task at client side, but it can also be rendered at server sidd. Both can work together.
It also uses a unique concept in it which is use of Virtual DOM that renders subtrees of nodejs based upon state changes. It got with minimum DOM manipulation possible to keep your component up to date.
We will go with the easiest way. So let’s start by running the command in your terminal below:
npm install -g create-react-app
This command will install react-app globally in your system, after running this command successfully then you can create react project in your system and named the project name with your choice by running the command below:
npx create–react–app project–name
This command will take few’s moments to complete. And after completion the all of the processes then you can change the current directory to the react project directory by running the command below:
cd project
–name
After running this command now you are on the react app directory,then start react app in your local environment by running this command:
npm start
After running the npm start command your react app will run in the default browser of your system on http://localhost:3000
Then finally this is your react app looked like this in your system.Then start coding in your src/App.js file.
In this article, we learn for getting started with reactjs and about the basics of reactjs
That’s all for now. Thank you for reading and I hope this post will be helpful for beginners who are going to start working with reactjs.
Let me know your thoughts over the email demo.jsonworld@gmail.com. I would love to hear them and If you like this article, share with your friends.
You can download complete code from here. Download Code