Professional Documents
Culture Documents
React JS Section-1
React JS Section-1
Contents
What is React JS?
Why React JS
Getting Setup
Prerequisites
What React JS?
React is a declarative, efficient, and flexible JavaScript library for building user interfaces.
React JS was created by Jordan Walke, a software engineer at Facebook. IT was open
React can be used as a base in the development of SPA (Single Page Apps) or Hybrid Mobile
Apps.
However to create a complex apps, React is required use a composition of various libraries for
While other technologies such as Angular were available when Facebook developed ReactJS,
most developers were forced to do a lot of coding. Developers using other frameworks have the
challenge of having to rework on most codes even when crafting components that changed
frequently. What they wanted was a framework that could allow them to break down complex
components and reuse the codes to complete their projects faster.
Getting Setup
1. Make sure that you have a recent version of NodeJS installed
2. Follow the installation Instructions to create new project
npm install –g create-react-app
create-react-app myApp
3. Delete all files in the src/ folder of the new project ( delete only its contents inside folder)
cd my-app
rm –f src/*
4. Add a file named index.css in the src/ folder with this CSS code
5. Add a file named index.js in the src/ folder with JS code
6. Add these 3 lines to top of index.js in the src/ folder
import React from ‘react’;
import ReactDOM from ‘react-dom’;
import ‘./index.css’;
Prerequisites
We will assume some familiarity with HTML and JavaScript. But you should be able to follow along
even if you haven’t used them before.
If you need a refresher on JavaScript, React Js Include ES6 Concepts, using of arrow functions,
classes, let and const statements. We can use the babel REPL also.