SlideShare a Scribd company logo
1 of 15
React JS
A Quick Introduction Tutorial
Mohammed Fazuluddin
Topics
 Overview
 React JS Features
 React JS Architecture
 React + Redux Architecture
 React JS components
 React JS Best Practices
 Pro’s and Con’s
 Useful Links
Overview
 React JS is a front-end library developed by Facebook. It is used for handling
the view layer for web and mobile apps.
 React JS allows us to create reusable UI components.
 It is currently one of the most popular JavaScript libraries and has a strong
foundation and large community behind it.
 React JS is a declarative, efficient, and flexible JavaScript library for building
user interfaces.
 It lets you compose complex UIs from small and isolated pieces of code called
“components”.
 React JS is JavaScript library used for building reusable UI components.
Overview
 React JS is a library for building composable user interfaces.
 React JS encourages the creation of reusable UI components, which present
data that changes over time.
 Lots of people use React as the V in MVC. React abstracts away the DOM from
you, offering a simpler programming model and better performance.
 React JS can also render on the server using Node, and it can power native
apps using React Native.
 React JS implements one-way reactive data flow, which reduces the
boilerplate and is easier to reason about than traditional data binding.
React JS Features
 JSX − JSX is JavaScript syntax extension. It isn't necessary to use JSX in React
development, but it is recommended.
 Components − React is all about components. You need to think of everything
as a component. This will help you maintain the code when working on larger
scale projects.
 Unidirectional data flow and Flux − React implements one-way data flow
which makes it easy to reason about your app. Flux is a pattern that helps
keeping your data unidirectional.
 License − React is licensed under the Facebook Inc. Documentation is
licensed under CC BY 4.0.
React JS Architecture
React + Redux Architecture
React JS components
 State-full or class-based components
 A state-full component has its state and data associated with the state.
 You can pass data inside this type of component via state or props objects.
 State-full components are also harder to support as they persist some data and
may change the global state of the app.
 State-less or function-based components
 State-less components or function-based components and what React Hooks is for
Function-based components are just simple JavaScript functions.
 State-less function-based components have some limitations and essentially must
have one global place to manage state.
React JS components
 Presentational (or high-order) components
 High-Order Component (or HOC) is essentially a design pattern, also known as a
Decorator Pattern.
 In ReactJS, a HOC is a component that wraps another component by adding extra
functionality or extra properties.
 This allows abstraction from some commonly used logic and keeps your code DRY.
 Container components
 Container components, on the other hand, have logic to set state or have functions
to emit events up to a parent component.
 The general rule of the thumb is to keep your component as simple as possible with
a Single Responsibility Principle design principle in mind, which essentially means
your component must do one thing, but do it well.
React JS Best Practices
 When using ReduxJS, split your Reducer code into smaller methods to avoid
huge JSON within your Reducer.
 Use the create-react-app generator to bootstrap your ReactJS app.
 Keep your code DRY. Don’t Repeat Yourself, but keep in mind code duplicate is
NOT always a bad thing.
 Avoid having large classes, methods or components, including Reducers.
 Use more robust managers to manage application state, such as Redux.
 Use event synchronizer, such as Redux-Thunk, for interactions with your back
end API.
 Avoid passing too many attributes or arguments. Limit yourself to five props
that you pass into your component.
React JS Best Practices
 Use React JS defaultProps and React JS propTypes.
 Use linter, break up lines that are too long.
 Keep your own jslint configuration file.
 Always use a dependency manager with a lock file, such as NPM or yarn.
 Test your commonly accessed code, code that is complex and prone to bugs.
 Use ES6 de-structuring for your props.
 Use conditional rendering.
 User `map()` to collect and render collections of components.
 Use JEST to test your React JS code.
Pro’s and Con’s
 Pro’s:
 Updates process is optimized and accelerated.
 JSX makes components/blocks code readable. It displays how components are
plugged or combined with.
 React’s data binding establishes conditions for creation dynamic applications.
 Prompt rendering. Using comprises methods to minimize number of DOM operations
helps to optimize updating process and accelerate it.
 Testable. React’s native tools are offered for testing, debugging code.
 Up to date. Facebook team supports the library. Advice or code samples can be
given by Facebook community.
 Using React+ES6/7, application gets high-tech and is suitable for high load systems.
Pro’s and Con’s
 Con’s:
 Learning curve. Being not full-featured framework it is required in-depth
knowledge for integration user interface free library into MVC framework.
 View-orientedness is one of the cons of React JS. It should be found 'Model' and
'Controller' to resolve 'View' problem.
 Not using isomorphic approach to exploit application leads to search engines
indexing problems.
 Lots of developers dislike JSX Reacts documentation, manuals are difficult for
newcomers’ understanding.
 Reacts large size library.
Useful Links
 React JS Environment setups
 https://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htm
 Sample Examples
 https://reactjs.org/community/examples.html
Thanks
If you feel that it is helpful and worthy to share with others then please like and share the same.

More Related Content

What's hot (20)

Learn react-js
Learn react-jsLearn react-js
Learn react-js
 
React workshop
React workshopReact workshop
React workshop
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
Its time to React.js
Its time to React.jsIts time to React.js
Its time to React.js
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
ReactJS presentation.pptx
ReactJS presentation.pptxReactJS presentation.pptx
ReactJS presentation.pptx
 
reactJS
reactJSreactJS
reactJS
 
React js
React jsReact js
React js
 
React JS
React JSReact JS
React JS
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
ReactJS
ReactJSReactJS
ReactJS
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React-JS.pptx
React-JS.pptxReact-JS.pptx
React-JS.pptx
 
Reactjs
ReactjsReactjs
Reactjs
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 

Similar to React JS - A quick introduction tutorial

The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.Wikiance
 
React Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHatReact Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHatScholarhat
 
React Best Practices All Developers Should Follow in 2024.pdf
React Best Practices All Developers Should Follow in 2024.pdfReact Best Practices All Developers Should Follow in 2024.pdf
React Best Practices All Developers Should Follow in 2024.pdfBOSC Tech Labs
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js SimplifiedSunil Yadav
 
Techpaathshala ReactJS .pdf
Techpaathshala ReactJS .pdfTechpaathshala ReactJS .pdf
Techpaathshala ReactJS .pdfTechpaathshala
 
FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSIRJET Journal
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|programmersclubonlin
 
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdfa-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdfRobertThorson2
 
Comprehensive Guide to React Development 2022.pptx
Comprehensive Guide to React Development 2022.pptxComprehensive Guide to React Development 2022.pptx
Comprehensive Guide to React Development 2022.pptx75waytechnologies
 
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdf
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdfreactjs-vs-angularjs-which-is-the-best-framework-for-you.pdf
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdfRobertThorson2
 
React js vs react native a comparative analysis
React js vs react native a comparative analysisReact js vs react native a comparative analysis
React js vs react native a comparative analysisShelly Megan
 
Why Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdfWhy Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdfKaty Slemon
 
All about React Js
All about React JsAll about React Js
All about React JsGargi Raghav
 
Skill practical javascript diy projects
Skill practical javascript diy projectsSkill practical javascript diy projects
Skill practical javascript diy projectsSkillPracticalEdTech
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxSHAIKIRFAN715544
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptxSHAIKIRFAN715544
 
Maximize Development Efficiency with ReactJS.pdf
Maximize Development Efficiency with ReactJS.pdfMaximize Development Efficiency with ReactJS.pdf
Maximize Development Efficiency with ReactJS.pdfBOSC Tech Labs
 

Similar to React JS - A quick introduction tutorial (20)

The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.The following features are associated with reacting to lifecycle methods.
The following features are associated with reacting to lifecycle methods.
 
React Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHatReact Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHat
 
React Best Practices All Developers Should Follow in 2024.pdf
React Best Practices All Developers Should Follow in 2024.pdfReact Best Practices All Developers Should Follow in 2024.pdf
React Best Practices All Developers Should Follow in 2024.pdf
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
Techpaathshala ReactJS .pdf
Techpaathshala ReactJS .pdfTechpaathshala ReactJS .pdf
Techpaathshala ReactJS .pdf
 
FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JS
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|
 
learning react
learning reactlearning react
learning react
 
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdfa-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
 
What is ReactJS?
What is ReactJS?What is ReactJS?
What is ReactJS?
 
Comprehensive Guide to React Development 2022.pptx
Comprehensive Guide to React Development 2022.pptxComprehensive Guide to React Development 2022.pptx
Comprehensive Guide to React Development 2022.pptx
 
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdf
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdfreactjs-vs-angularjs-which-is-the-best-framework-for-you.pdf
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdf
 
React js vs react native a comparative analysis
React js vs react native a comparative analysisReact js vs react native a comparative analysis
React js vs react native a comparative analysis
 
Why Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdfWhy Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdf
 
All about React Js
All about React JsAll about React Js
All about React Js
 
Skill practical javascript diy projects
Skill practical javascript diy projectsSkill practical javascript diy projects
Skill practical javascript diy projects
 
Copy of React_JS_Notes.pdf
Copy of React_JS_Notes.pdfCopy of React_JS_Notes.pdf
Copy of React_JS_Notes.pdf
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
Maximize Development Efficiency with ReactJS.pdf
Maximize Development Efficiency with ReactJS.pdfMaximize Development Efficiency with ReactJS.pdf
Maximize Development Efficiency with ReactJS.pdf
 

More from Mohammed Fazuluddin

Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityMohammed Fazuluddin
 
Software architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding GuideSoftware architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding GuideMohammed Fazuluddin
 
Mule ESB - An Enterprise Service Bus
Mule ESB - An Enterprise Service BusMule ESB - An Enterprise Service Bus
Mule ESB - An Enterprise Service BusMohammed Fazuluddin
 
Docker - A Quick Introduction Guide
Docker - A Quick Introduction GuideDocker - A Quick Introduction Guide
Docker - A Quick Introduction GuideMohammed Fazuluddin
 
Cassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction GuideCassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction GuideMohammed Fazuluddin
 
Selecting the right cache framework
Selecting the right cache frameworkSelecting the right cache framework
Selecting the right cache frameworkMohammed Fazuluddin
 
Cloud computing and data security
Cloud computing and data securityCloud computing and data security
Cloud computing and data securityMohammed Fazuluddin
 

More from Mohammed Fazuluddin (20)

DOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGNDOMAIN DRIVER DESIGN
DOMAIN DRIVER DESIGN
 
New Relic Basics
New Relic BasicsNew Relic Basics
New Relic Basics
 
Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
 
Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API Security
 
Software architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding GuideSoftware architectural patterns - A Quick Understanding Guide
Software architectural patterns - A Quick Understanding Guide
 
Mule ESB - An Enterprise Service Bus
Mule ESB - An Enterprise Service BusMule ESB - An Enterprise Service Bus
Mule ESB - An Enterprise Service Bus
 
Docker - A Quick Introduction Guide
Docker - A Quick Introduction GuideDocker - A Quick Introduction Guide
Docker - A Quick Introduction Guide
 
Cassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction GuideCassandra - A Basic Introduction Guide
Cassandra - A Basic Introduction Guide
 
Rest API Design Rules
Rest API Design RulesRest API Design Rules
Rest API Design Rules
 
Scrum process framework
Scrum process frameworkScrum process framework
Scrum process framework
 
DevOps and Tools
DevOps and ToolsDevOps and Tools
DevOps and Tools
 
UI architecture & designing
UI architecture & designingUI architecture & designing
UI architecture & designing
 
Data streaming fundamentals
Data streaming fundamentalsData streaming fundamentals
Data streaming fundamentals
 
Microservice's in detailed
Microservice's in detailedMicroservice's in detailed
Microservice's in detailed
 
Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Java workflow engines
Java workflow enginesJava workflow engines
Java workflow engines
 
Selecting the right cache framework
Selecting the right cache frameworkSelecting the right cache framework
Selecting the right cache framework
 
Cloud computing and data security
Cloud computing and data securityCloud computing and data security
Cloud computing and data security
 
Java Security Framework's
Java Security Framework'sJava Security Framework's
Java Security Framework's
 
Security Design Concepts
Security Design ConceptsSecurity Design Concepts
Security Design Concepts
 

Recently uploaded

XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

React JS - A quick introduction tutorial

  • 1. React JS A Quick Introduction Tutorial Mohammed Fazuluddin
  • 2. Topics  Overview  React JS Features  React JS Architecture  React + Redux Architecture  React JS components  React JS Best Practices  Pro’s and Con’s  Useful Links
  • 3. Overview  React JS is a front-end library developed by Facebook. It is used for handling the view layer for web and mobile apps.  React JS allows us to create reusable UI components.  It is currently one of the most popular JavaScript libraries and has a strong foundation and large community behind it.  React JS is a declarative, efficient, and flexible JavaScript library for building user interfaces.  It lets you compose complex UIs from small and isolated pieces of code called “components”.  React JS is JavaScript library used for building reusable UI components.
  • 4. Overview  React JS is a library for building composable user interfaces.  React JS encourages the creation of reusable UI components, which present data that changes over time.  Lots of people use React as the V in MVC. React abstracts away the DOM from you, offering a simpler programming model and better performance.  React JS can also render on the server using Node, and it can power native apps using React Native.  React JS implements one-way reactive data flow, which reduces the boilerplate and is easier to reason about than traditional data binding.
  • 5. React JS Features  JSX − JSX is JavaScript syntax extension. It isn't necessary to use JSX in React development, but it is recommended.  Components − React is all about components. You need to think of everything as a component. This will help you maintain the code when working on larger scale projects.  Unidirectional data flow and Flux − React implements one-way data flow which makes it easy to reason about your app. Flux is a pattern that helps keeping your data unidirectional.  License − React is licensed under the Facebook Inc. Documentation is licensed under CC BY 4.0.
  • 7. React + Redux Architecture
  • 8. React JS components  State-full or class-based components  A state-full component has its state and data associated with the state.  You can pass data inside this type of component via state or props objects.  State-full components are also harder to support as they persist some data and may change the global state of the app.  State-less or function-based components  State-less components or function-based components and what React Hooks is for Function-based components are just simple JavaScript functions.  State-less function-based components have some limitations and essentially must have one global place to manage state.
  • 9. React JS components  Presentational (or high-order) components  High-Order Component (or HOC) is essentially a design pattern, also known as a Decorator Pattern.  In ReactJS, a HOC is a component that wraps another component by adding extra functionality or extra properties.  This allows abstraction from some commonly used logic and keeps your code DRY.  Container components  Container components, on the other hand, have logic to set state or have functions to emit events up to a parent component.  The general rule of the thumb is to keep your component as simple as possible with a Single Responsibility Principle design principle in mind, which essentially means your component must do one thing, but do it well.
  • 10. React JS Best Practices  When using ReduxJS, split your Reducer code into smaller methods to avoid huge JSON within your Reducer.  Use the create-react-app generator to bootstrap your ReactJS app.  Keep your code DRY. Don’t Repeat Yourself, but keep in mind code duplicate is NOT always a bad thing.  Avoid having large classes, methods or components, including Reducers.  Use more robust managers to manage application state, such as Redux.  Use event synchronizer, such as Redux-Thunk, for interactions with your back end API.  Avoid passing too many attributes or arguments. Limit yourself to five props that you pass into your component.
  • 11. React JS Best Practices  Use React JS defaultProps and React JS propTypes.  Use linter, break up lines that are too long.  Keep your own jslint configuration file.  Always use a dependency manager with a lock file, such as NPM or yarn.  Test your commonly accessed code, code that is complex and prone to bugs.  Use ES6 de-structuring for your props.  Use conditional rendering.  User `map()` to collect and render collections of components.  Use JEST to test your React JS code.
  • 12. Pro’s and Con’s  Pro’s:  Updates process is optimized and accelerated.  JSX makes components/blocks code readable. It displays how components are plugged or combined with.  React’s data binding establishes conditions for creation dynamic applications.  Prompt rendering. Using comprises methods to minimize number of DOM operations helps to optimize updating process and accelerate it.  Testable. React’s native tools are offered for testing, debugging code.  Up to date. Facebook team supports the library. Advice or code samples can be given by Facebook community.  Using React+ES6/7, application gets high-tech and is suitable for high load systems.
  • 13. Pro’s and Con’s  Con’s:  Learning curve. Being not full-featured framework it is required in-depth knowledge for integration user interface free library into MVC framework.  View-orientedness is one of the cons of React JS. It should be found 'Model' and 'Controller' to resolve 'View' problem.  Not using isomorphic approach to exploit application leads to search engines indexing problems.  Lots of developers dislike JSX Reacts documentation, manuals are difficult for newcomers’ understanding.  Reacts large size library.
  • 14. Useful Links  React JS Environment setups  https://www.tutorialspoint.com/reactjs/reactjs_environment_setup.htm  Sample Examples  https://reactjs.org/community/examples.html
  • 15. Thanks If you feel that it is helpful and worthy to share with others then please like and share the same.