Starting with React

React is a JavaScript library for building user interfaces. React has a few different kinds of components, that are part of React.Component subclasses.

Install npm and then run following commands on terminal to start with react.

npm install -g create-react-app
create-react-app my-app

cd my-app
npm start

It will take you to browser on URL localhost:3000.

First call is in src/index.js.
App, document.getElementById('root')

A component takes in parameters, called props, and returns a hierarchy of views to display via the rendermethod.

The render method returns a description of what you want to render, and then React takes that description and renders it to the screen. In particular, render returns a React element, which is a lightweight description of what to render.

Source :


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s