Getting Started with react.js

    Mar 20, 2017       by Suraj Roy
getting-started-with-reactjs.jpg

In this article, today we will discuss about a very simple demo in react js. So let’s  proceed.

 Install node.js in your system

What is node.js ?

  1. Node.js is an open source, cross-platform runtime server environment for developing server-side and networking applications.
  2. Node.js applications are written in javascript.

Install it from its official site. Once nodejs is installed, npm is installed automatically. So now what is npm?

  1. Npm is stand for node package manger.
  2. Npm is a package manager for Node.js packages.
  3. A package in Node.js contains all the files you need for a module.
  4. Modules are JavaScript libraries you can include in your project.

 

What is React?

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.

 

Install react application in your system

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 projectname

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.

Conclusion

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


WHAT'S NEW

Find other similar Articles here: