SlideShare a Scribd company logo
ReactJs : Tutorial-01-Introduction
React / React.js / ReactJS
 JavaScript Library
 Fast & Interactive UI Building
 In 2011 by FaceBook - Software Engineer, Jordan Walke
 Sizable and Complex UIs with Small – Isolated code
 Sometimes React called Framework but technically it’s a
Library.
 React Native is a framework (like Vue.js and Angular)
 React.JS version V16.13.1 (July 2020). (reactjs.org)
 Create-react-app version 2.0 supports Babel 7, webpack 4, and
Jest23.
Thinking in React Component
 React Component is a bunch of independent, isolated and reusable
bunch of code.
 Like a simple function, it can call, pass some input and they render
some output.
 Reuse components, Merge them, Complex UI.
Setting up a React Environment
Step: 1 : Install node.js (nodejs.org)
Step: 2 : check version of nodejs and npm
Step: 3 : Install ReactJs
$ npm install –g create-react-app
Step: 4 : Create first application
$ create-react-app myapp (must be small letters)
Step: 5 : It will create myapp folder, change folder using ‘cd’
ReactJs : Tutorial-01-Introduction
$ cd myapp
Step: 6: To run the project
User/Jainul/myapp$ npm start
Manual Setup of a React Environment
Step: 1 : Install node.js (nodejs.org)
Step: 2 : check version of nodejs and npm
Step: 3 : Create a project folder i.e. myapp and go to the folder myapp
Step: 4 : Create package.json
$ npm init.
Step: 5 : Now we will install the packages that we need.
Open the terminal or command prompt and run the commands inside the folder myapp/.
npm install react --save-dev
npm install react-dom --save-dev
npm install react-scripts --save-dev
Step: 6 : Create a folder src/ where all the js code will come in that folder.
All the code for reactjs project will be available in the src/ folder.
Create a file index.js and add import react and react-dom, as shown below.
Index.js
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
<h1>Hello, from RTDL Tutorials!</h1>,
document.getElementById('root')
);
Step: 7 : Create a folder public/ and add index.html in that as shown below
<!DOCTYPE html>
<html>
ReactJs : Tutorial-01-Introduction
<head>
<meta charset="UTF-8" />
<title>ReactJS Demo</title>
</head>
<body>
<div id = "root"></div>
</body>
</html>
We will have the directory structure as shown below…
reatproj/
src/
index.js
node_modules/
public/
index.html
package.json
Step: 8 : We have added the commands to compile the final file in
package.json as follows:
"scripts": {
"start": "react-scripts start"
},
Step: 9 : To compile the final file run following command:
npm start
Step: 10 : The URL http://localhost:3000 will open in the browser once the code is
compiled as shown below:

More Related Content

What's hot

React custom renderers
React custom renderersReact custom renderers
React custom renderers
Giovanni Jiayi Hu
 
React: JSX and Top Level API
React: JSX and Top Level APIReact: JSX and Top Level API
React: JSX and Top Level API
Fabio Biondi
 
React native app with type script tutorial
React native app with type script tutorialReact native app with type script tutorial
React native app with type script tutorial
Katy Slemon
 
Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...
Katy Slemon
 
[Fevr] Can't live if livin' is without rendering
[Fevr] Can't live if livin' is without rendering[Fevr] Can't live if livin' is without rendering
[Fevr] Can't live if livin' is without rendering
Giovanni Jiayi Hu
 
React hooks
React hooksReact hooks
React hooks
Ramy ElBasyouni
 
3 Simple Steps to follow to Create React JS Components
3 Simple Steps to follow to Create React JS Components3 Simple Steps to follow to Create React JS Components
3 Simple Steps to follow to Create React JS Components
Surendra kumar
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
Knoldus Inc.
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directives
Marios Fakiolas
 
Pluginkla2019 - React Presentation
Pluginkla2019 - React PresentationPluginkla2019 - React Presentation
Pluginkla2019 - React Presentation
Angela Lehru
 
Angular 5
Angular 5Angular 5
ReactJs
ReactJsReactJs
ReactJs
LearningTech
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2
Ross Dederer
 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18
Maurice De Beijer [MVP]
 
7 Redux challenges
7 Redux challenges7 Redux challenges
7 Redux challenges
reactima
 
Code migration from Angular 1.x to Angular 2.0
Code migration from Angular 1.x to Angular 2.0Code migration from Angular 1.x to Angular 2.0
Code migration from Angular 1.x to Angular 2.0
Ran Wahle
 
Running SQL from a Groovy Event Handler in Agile PLM
Running SQL from a Groovy Event Handler in Agile PLMRunning SQL from a Groovy Event Handler in Agile PLM
Running SQL from a Groovy Event Handler in Agile PLM
PLM Mechanic .
 
Asp dot-net core problems and fixes
Asp dot-net core problems and fixes Asp dot-net core problems and fixes
Asp dot-net core problems and fixes
sonia merchant
 
Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??
Laurent Duveau
 
Angular 2
Angular 2Angular 2
Angular 2
Pramod Raghav
 

What's hot (20)

React custom renderers
React custom renderersReact custom renderers
React custom renderers
 
React: JSX and Top Level API
React: JSX and Top Level APIReact: JSX and Top Level API
React: JSX and Top Level API
 
React native app with type script tutorial
React native app with type script tutorialReact native app with type script tutorial
React native app with type script tutorial
 
Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...Redux and context api with react native app introduction, use cases, implemen...
Redux and context api with react native app introduction, use cases, implemen...
 
[Fevr] Can't live if livin' is without rendering
[Fevr] Can't live if livin' is without rendering[Fevr] Can't live if livin' is without rendering
[Fevr] Can't live if livin' is without rendering
 
React hooks
React hooksReact hooks
React hooks
 
3 Simple Steps to follow to Create React JS Components
3 Simple Steps to follow to Create React JS Components3 Simple Steps to follow to Create React JS Components
3 Simple Steps to follow to Create React JS Components
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Get rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directivesGet rid of controllers in angular 1.5.x start using component directives
Get rid of controllers in angular 1.5.x start using component directives
 
Pluginkla2019 - React Presentation
Pluginkla2019 - React PresentationPluginkla2019 - React Presentation
Pluginkla2019 - React Presentation
 
Angular 5
Angular 5Angular 5
Angular 5
 
ReactJs
ReactJsReactJs
ReactJs
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2
 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18
 
7 Redux challenges
7 Redux challenges7 Redux challenges
7 Redux challenges
 
Code migration from Angular 1.x to Angular 2.0
Code migration from Angular 1.x to Angular 2.0Code migration from Angular 1.x to Angular 2.0
Code migration from Angular 1.x to Angular 2.0
 
Running SQL from a Groovy Event Handler in Agile PLM
Running SQL from a Groovy Event Handler in Agile PLMRunning SQL from a Groovy Event Handler in Agile PLM
Running SQL from a Groovy Event Handler in Agile PLM
 
Asp dot-net core problems and fixes
Asp dot-net core problems and fixes Asp dot-net core problems and fixes
Asp dot-net core problems and fixes
 
Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??
 
Angular 2
Angular 2Angular 2
Angular 2
 

Similar to React js t1 - introduction

Reactjs
ReactjsReactjs
slides.pptx
slides.pptxslides.pptx
slides.pptx
HafidzIhzaPratama
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.
Techugo
 
ReactJS software installation
ReactJS software installationReactJS software installation
ReactJS software installation
HopeTutors1
 
How to install ReactJS software
How to install ReactJS software How to install ReactJS software
How to install ReactJS software
VigneshVijay21
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
Concetto Labs
 
Learn react-js
Learn react-jsLearn react-js
Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...
UA Mobile
 
1. react - native: setup
1. react - native: setup1. react - native: setup
1. react - native: setup
Govind Prasad Gupta
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic
rafaqathussainc077
 
Lecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptxLecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptx
GevitaChinnaiah
 
React_Complete.pptx
React_Complete.pptxReact_Complete.pptx
React_Complete.pptx
kamalakantas
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
Steve Keener
 
Native development kit (ndk) introduction
Native development kit (ndk)  introductionNative development kit (ndk)  introduction
Native development kit (ndk) introduction
Rakesh Jha
 
React JS Lecture 10.pptx Our clg lecture
React JS Lecture 10.pptx Our clg lectureReact JS Lecture 10.pptx Our clg lecture
React JS Lecture 10.pptx Our clg lecture
ranjeet2000thakkar
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript
Serge van den Oever
 
React Django Presentation
React Django PresentationReact Django Presentation
React Django Presentation
Allison DiNapoli
 
learning react
learning reactlearning react
learning react
Eueung Mulyana
 
Pemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic frameworkPemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic framework
Puguh Rismadi
 

Similar to React js t1 - introduction (20)

Reactjs
ReactjsReactjs
Reactjs
 
slides.pptx
slides.pptxslides.pptx
slides.pptx
 
slides.pptx
slides.pptxslides.pptx
slides.pptx
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.
 
ReactJS software installation
ReactJS software installationReactJS software installation
ReactJS software installation
 
How to install ReactJS software
How to install ReactJS software How to install ReactJS software
How to install ReactJS software
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
Learn react-js
Learn react-jsLearn react-js
Learn react-js
 
Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...
 
1. react - native: setup
1. react - native: setup1. react - native: setup
1. react - native: setup
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic
 
Lecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptxLecture 1 Introduction to React Native.pptx
Lecture 1 Introduction to React Native.pptx
 
React_Complete.pptx
React_Complete.pptxReact_Complete.pptx
React_Complete.pptx
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 
Native development kit (ndk) introduction
Native development kit (ndk)  introductionNative development kit (ndk)  introduction
Native development kit (ndk) introduction
 
React JS Lecture 10.pptx Our clg lecture
React JS Lecture 10.pptx Our clg lectureReact JS Lecture 10.pptx Our clg lecture
React JS Lecture 10.pptx Our clg lecture
 
Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript Building an Ionic hybrid mobile app with TypeScript
Building an Ionic hybrid mobile app with TypeScript
 
React Django Presentation
React Django PresentationReact Django Presentation
React Django Presentation
 
learning react
learning reactlearning react
learning react
 
Pemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic frameworkPemrograman mobile menggunakan ionic framework
Pemrograman mobile menggunakan ionic framework
 

More from Jainul Musani

Python: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - IntroductionPython: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - Introduction
Jainul Musani
 
Python a Versatile Programming Language - Introduction
Python a Versatile Programming Language - IntroductionPython a Versatile Programming Language - Introduction
Python a Versatile Programming Language - Introduction
Jainul Musani
 
React js t2 - jsx
React js   t2 - jsxReact js   t2 - jsx
React js t2 - jsx
Jainul Musani
 
ExpressJs Session01
ExpressJs Session01ExpressJs Session01
ExpressJs Session01
Jainul Musani
 
NodeJs Session03
NodeJs Session03NodeJs Session03
NodeJs Session03
Jainul Musani
 
NodeJs Session02
NodeJs Session02NodeJs Session02
NodeJs Session02
Jainul Musani
 
Nodejs Session01
Nodejs Session01Nodejs Session01
Nodejs Session01
Jainul Musani
 
Java exercise1
Java exercise1Java exercise1
Java exercise1
Jainul Musani
 
Fundamentals of JDBC
Fundamentals of JDBCFundamentals of JDBC
Fundamentals of JDBC
Jainul Musani
 
Core Java Special
Core Java SpecialCore Java Special
Core Java Special
Jainul Musani
 
Core Java Special
Core Java SpecialCore Java Special
Core Java Special
Jainul Musani
 
Cassandra-vs-MongoDB
Cassandra-vs-MongoDBCassandra-vs-MongoDB
Cassandra-vs-MongoDB
Jainul Musani
 
MongoDB-SESSION03
MongoDB-SESSION03MongoDB-SESSION03
MongoDB-SESSION03
Jainul Musani
 
MongoDB-SESSION02
MongoDB-SESSION02MongoDB-SESSION02
MongoDB-SESSION02
Jainul Musani
 
MongoDB-SESION01
MongoDB-SESION01MongoDB-SESION01
MongoDB-SESION01
Jainul Musani
 
4+1archi
4+1archi4+1archi
4+1archi
Jainul Musani
 
Python 1
Python 1Python 1
Python 1
Jainul Musani
 
Collection framework
Collection frameworkCollection framework
Collection framework
Jainul Musani
 
SAP for Beginners
SAP for BeginnersSAP for Beginners
SAP for Beginners
Jainul Musani
 

More from Jainul Musani (20)

Python: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - IntroductionPython: The Versatile Programming Language - Introduction
Python: The Versatile Programming Language - Introduction
 
Python a Versatile Programming Language - Introduction
Python a Versatile Programming Language - IntroductionPython a Versatile Programming Language - Introduction
Python a Versatile Programming Language - Introduction
 
React js t2 - jsx
React js   t2 - jsxReact js   t2 - jsx
React js t2 - jsx
 
ExpressJs Session01
ExpressJs Session01ExpressJs Session01
ExpressJs Session01
 
NodeJs Session03
NodeJs Session03NodeJs Session03
NodeJs Session03
 
NodeJs Session02
NodeJs Session02NodeJs Session02
NodeJs Session02
 
Nodejs Session01
Nodejs Session01Nodejs Session01
Nodejs Session01
 
Java exercise1
Java exercise1Java exercise1
Java exercise1
 
Fundamentals of JDBC
Fundamentals of JDBCFundamentals of JDBC
Fundamentals of JDBC
 
Core Java Special
Core Java SpecialCore Java Special
Core Java Special
 
Core Java Special
Core Java SpecialCore Java Special
Core Java Special
 
Cassandra-vs-MongoDB
Cassandra-vs-MongoDBCassandra-vs-MongoDB
Cassandra-vs-MongoDB
 
MongoDB-SESSION03
MongoDB-SESSION03MongoDB-SESSION03
MongoDB-SESSION03
 
MongoDB-SESSION02
MongoDB-SESSION02MongoDB-SESSION02
MongoDB-SESSION02
 
MongoDB-SESION01
MongoDB-SESION01MongoDB-SESION01
MongoDB-SESION01
 
4+1archi
4+1archi4+1archi
4+1archi
 
Python 1
Python 1Python 1
Python 1
 
eCertificate-JAVA-2
eCertificate-JAVA-2eCertificate-JAVA-2
eCertificate-JAVA-2
 
Collection framework
Collection frameworkCollection framework
Collection framework
 
SAP for Beginners
SAP for BeginnersSAP for Beginners
SAP for Beginners
 

Recently uploaded

The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

React js t1 - introduction

  • 1. ReactJs : Tutorial-01-Introduction React / React.js / ReactJS  JavaScript Library  Fast & Interactive UI Building  In 2011 by FaceBook - Software Engineer, Jordan Walke  Sizable and Complex UIs with Small – Isolated code  Sometimes React called Framework but technically it’s a Library.  React Native is a framework (like Vue.js and Angular)  React.JS version V16.13.1 (July 2020). (reactjs.org)  Create-react-app version 2.0 supports Babel 7, webpack 4, and Jest23. Thinking in React Component  React Component is a bunch of independent, isolated and reusable bunch of code.  Like a simple function, it can call, pass some input and they render some output.  Reuse components, Merge them, Complex UI. Setting up a React Environment Step: 1 : Install node.js (nodejs.org) Step: 2 : check version of nodejs and npm Step: 3 : Install ReactJs $ npm install –g create-react-app Step: 4 : Create first application $ create-react-app myapp (must be small letters) Step: 5 : It will create myapp folder, change folder using ‘cd’
  • 2. ReactJs : Tutorial-01-Introduction $ cd myapp Step: 6: To run the project User/Jainul/myapp$ npm start Manual Setup of a React Environment Step: 1 : Install node.js (nodejs.org) Step: 2 : check version of nodejs and npm Step: 3 : Create a project folder i.e. myapp and go to the folder myapp Step: 4 : Create package.json $ npm init. Step: 5 : Now we will install the packages that we need. Open the terminal or command prompt and run the commands inside the folder myapp/. npm install react --save-dev npm install react-dom --save-dev npm install react-scripts --save-dev Step: 6 : Create a folder src/ where all the js code will come in that folder. All the code for reactjs project will be available in the src/ folder. Create a file index.js and add import react and react-dom, as shown below. Index.js import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( <h1>Hello, from RTDL Tutorials!</h1>, document.getElementById('root') ); Step: 7 : Create a folder public/ and add index.html in that as shown below <!DOCTYPE html> <html>
  • 3. ReactJs : Tutorial-01-Introduction <head> <meta charset="UTF-8" /> <title>ReactJS Demo</title> </head> <body> <div id = "root"></div> </body> </html> We will have the directory structure as shown below… reatproj/ src/ index.js node_modules/ public/ index.html package.json Step: 8 : We have added the commands to compile the final file in package.json as follows: "scripts": { "start": "react-scripts start" }, Step: 9 : To compile the final file run following command: npm start Step: 10 : The URL http://localhost:3000 will open in the browser once the code is compiled as shown below: