SlideShare a Scribd company logo
2
Most read
6
Most read
12
Most read
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)

PDF
React js
Rajesh Kolla
 
ODP
Introduction to ReactJS
Knoldus Inc.
 
PPTX
Intro to React
Justin Reock
 
PPTX
Reactjs
Neha Sharma
 
PDF
WEB DEVELOPMENT USING REACT JS
MuthuKumaran Singaravelu
 
PDF
An introduction to React.js
Emanuele DelBono
 
PPTX
Introduction to React
Rob Quick
 
PPTX
React js
Oswald Campesato
 
PPTX
Its time to React.js
Ritesh Mehrotra
 
PPTX
React js programming concept
Tariqul islam
 
PPTX
React + Redux Introduction
Nikolaus Graf
 
PDF
Workshop 21: React Router
Visual Engineering
 
PDF
React JS - Introduction
Sergey Romaneko
 
PDF
Introduction to Redux
Ignacio Martín
 
PDF
React Js Simplified
Sunil Yadav
 
PPTX
React js - The Core Concepts
Divyang Bhambhani
 
PPTX
React workshop presentation
Bojan Golubović
 
PPTX
React-JS.pptx
AnmolPandita7
 
PPTX
Introduction to react js
Aeshan Wijetunge
 
React js
Rajesh Kolla
 
Introduction to ReactJS
Knoldus Inc.
 
Intro to React
Justin Reock
 
Reactjs
Neha Sharma
 
WEB DEVELOPMENT USING REACT JS
MuthuKumaran Singaravelu
 
An introduction to React.js
Emanuele DelBono
 
Introduction to React
Rob Quick
 
Its time to React.js
Ritesh Mehrotra
 
React js programming concept
Tariqul islam
 
React + Redux Introduction
Nikolaus Graf
 
Workshop 21: React Router
Visual Engineering
 
React JS - Introduction
Sergey Romaneko
 
Introduction to Redux
Ignacio Martín
 
React Js Simplified
Sunil Yadav
 
React js - The Core Concepts
Divyang Bhambhani
 
React workshop presentation
Bojan Golubović
 
React-JS.pptx
AnmolPandita7
 
Introduction to react js
Aeshan Wijetunge
 

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

PDF
ReactJS Development_ Everything You Need to Know.pdf
globaltechdev
 
PDF
The following features are associated with reacting to lifecycle methods.
Wikiance
 
PDF
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
bandmvh3697
 
PPTX
reactJS
Syam Santhosh
 
PDF
React Interview Question & Answers PDF By ScholarHat
Scholarhat
 
PDF
React Best Practices All Developers Should Follow in 2024.pdf
BOSC Tech Labs
 
PDF
Techpaathshala ReactJS .pdf
Techpaathshala
 
PDF
FRONTEND DEVELOPMENT WITH REACT.JS
IRJET Journal
 
PDF
Top 10 Differences Between React and JavaScript: A Detailed Comparison
Inwizards Software Technology
 
PPTX
react js training|react js training in mumbai|
programmersclubonlin
 
PDF
learning react
Eueung Mulyana
 
PPTX
React js introduction about it's features
SaiM947604
 
PDF
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
RobertThorson2
 
PPTX
What is ReactJS?
Albiorix Technology
 
PPTX
Comprehensive Guide to React Development 2022.pptx
75waytechnologies
 
PDF
React Interview Question PDF By ScholarHat
Scholarhat
 
PDF
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdf
RobertThorson2
 
PDF
React js vs react native a comparative analysis
Shelly Megan
 
PPTX
Reactjs
Mallikarjuna G D
 
PDF
Why Use React Js A Complete Guide (1).pdf
Katy Slemon
 
ReactJS Development_ Everything You Need to Know.pdf
globaltechdev
 
The following features are associated with reacting to lifecycle methods.
Wikiance
 
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
bandmvh3697
 
reactJS
Syam Santhosh
 
React Interview Question & Answers PDF By ScholarHat
Scholarhat
 
React Best Practices All Developers Should Follow in 2024.pdf
BOSC Tech Labs
 
Techpaathshala ReactJS .pdf
Techpaathshala
 
FRONTEND DEVELOPMENT WITH REACT.JS
IRJET Journal
 
Top 10 Differences Between React and JavaScript: A Detailed Comparison
Inwizards Software Technology
 
react js training|react js training in mumbai|
programmersclubonlin
 
learning react
Eueung Mulyana
 
React js introduction about it's features
SaiM947604
 
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
RobertThorson2
 
What is ReactJS?
Albiorix Technology
 
Comprehensive Guide to React Development 2022.pptx
75waytechnologies
 
React Interview Question PDF By ScholarHat
Scholarhat
 
reactjs-vs-angularjs-which-is-the-best-framework-for-you.pdf
RobertThorson2
 
React js vs react native a comparative analysis
Shelly Megan
 
Why Use React Js A Complete Guide (1).pdf
Katy Slemon
 
Ad

More from Mohammed Fazuluddin (20)

PDF
Cloud Providers and Their Key Features Explained
Mohammed Fazuluddin
 
PDF
Database Performance Handling : A comprehensive guide
Mohammed Fazuluddin
 
PDF
Design patterns Q&A | Important question and answers
Mohammed Fazuluddin
 
PDF
Software-Requirements-to-System-Design Basics
Mohammed Fazuluddin
 
PDF
MEAN-vs-MERN-A-Developers-Guide and Explanation
Mohammed Fazuluddin
 
PDF
Cloud AI Deployment Design Patterns - Learn the Basic Deployment Patterns
Mohammed Fazuluddin
 
PDF
Auto-scaling-real-time-software-applications-and-best-practices.pdf
Mohammed Fazuluddin
 
PDF
Java Version(v5 -v23) Features with sample code snippet
Mohammed Fazuluddin
 
PDF
Cloud Architecture Framework Pillar’s.pdf
Mohammed Fazuluddin
 
PDF
Implementing Generative AI and Machine Learning on GCP: Architectures, Use Ca...
Mohammed Fazuluddin
 
PDF
LEVERAGING AWS GENERATIVE AI: ARCHITECTURAL INSIGHTS AND REAL-WORLD IMPLEMENT...
Mohammed Fazuluddin
 
PDF
Basics of GraphQL : Unlocking the Power of GraphQL
Mohammed Fazuluddin
 
PPTX
SQL Injection Introduction and Prevention
Mohammed Fazuluddin
 
PPTX
DOMAIN DRIVER DESIGN
Mohammed Fazuluddin
 
PPTX
New Relic Basics
Mohammed Fazuluddin
 
PPTX
Terraform Basics
Mohammed Fazuluddin
 
PPTX
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
PPTX
Software architectural patterns - A Quick Understanding Guide
Mohammed Fazuluddin
 
PPTX
Mule ESB - An Enterprise Service Bus
Mohammed Fazuluddin
 
PPTX
Docker - A Quick Introduction Guide
Mohammed Fazuluddin
 
Cloud Providers and Their Key Features Explained
Mohammed Fazuluddin
 
Database Performance Handling : A comprehensive guide
Mohammed Fazuluddin
 
Design patterns Q&A | Important question and answers
Mohammed Fazuluddin
 
Software-Requirements-to-System-Design Basics
Mohammed Fazuluddin
 
MEAN-vs-MERN-A-Developers-Guide and Explanation
Mohammed Fazuluddin
 
Cloud AI Deployment Design Patterns - Learn the Basic Deployment Patterns
Mohammed Fazuluddin
 
Auto-scaling-real-time-software-applications-and-best-practices.pdf
Mohammed Fazuluddin
 
Java Version(v5 -v23) Features with sample code snippet
Mohammed Fazuluddin
 
Cloud Architecture Framework Pillar’s.pdf
Mohammed Fazuluddin
 
Implementing Generative AI and Machine Learning on GCP: Architectures, Use Ca...
Mohammed Fazuluddin
 
LEVERAGING AWS GENERATIVE AI: ARCHITECTURAL INSIGHTS AND REAL-WORLD IMPLEMENT...
Mohammed Fazuluddin
 
Basics of GraphQL : Unlocking the Power of GraphQL
Mohammed Fazuluddin
 
SQL Injection Introduction and Prevention
Mohammed Fazuluddin
 
DOMAIN DRIVER DESIGN
Mohammed Fazuluddin
 
New Relic Basics
Mohammed Fazuluddin
 
Terraform Basics
Mohammed Fazuluddin
 
Rest API Security - A quick understanding of Rest API Security
Mohammed Fazuluddin
 
Software architectural patterns - A Quick Understanding Guide
Mohammed Fazuluddin
 
Mule ESB - An Enterprise Service Bus
Mohammed Fazuluddin
 
Docker - A Quick Introduction Guide
Mohammed Fazuluddin
 
Ad

Recently uploaded (20)

PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PPTX
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
PPTX
Cubase Pro Crack 2025 – Free Download Full Version with Activation Key
HyperPc soft
 
PPTX
NeuroStrata: Harnessing Neuro-Symbolic Paradigms for Improved Testability and...
Ivan Ruchkin
 
PDF
Laboratory Workflows Digitalized and live in 90 days with Scifeon´s SAPPA P...
info969686
 
PPTX
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
PDF
GridView,Recycler view, API, SQLITE& NetworkRequest.pdf
Nabin Dhakal
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PDF
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PPTX
WYSIWYG Web Builder Crack 2025 – Free Download Full Version with License Key
HyperPc soft
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PPTX
PowerISO Crack 2025 – Free Download Full Version with Serial Key [Latest](1)....
HyperPc soft
 
PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
Cubase Pro Crack 2025 – Free Download Full Version with Activation Key
HyperPc soft
 
NeuroStrata: Harnessing Neuro-Symbolic Paradigms for Improved Testability and...
Ivan Ruchkin
 
Laboratory Workflows Digitalized and live in 90 days with Scifeon´s SAPPA P...
info969686
 
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
GridView,Recycler view, API, SQLITE& NetworkRequest.pdf
Nabin Dhakal
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
WYSIWYG Web Builder Crack 2025 – Free Download Full Version with License Key
HyperPc soft
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PowerISO Crack 2025 – Free Download Full Version with Serial Key [Latest](1)....
HyperPc soft
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 

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.