0% found this document useful (0 votes)
2 views

new 1

React JS is an open-source JavaScript library developed by Facebook for building web and mobile applications, particularly single-page applications. It utilizes a component-based architecture, virtual DOM for performance, and features like hooks for managing state and side effects. Redux is a library used alongside React for efficient state management across components.

Uploaded by

kaushikreddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

new 1

React JS is an open-source JavaScript library developed by Facebook for building web and mobile applications, particularly single-page applications. It utilizes a component-based architecture, virtual DOM for performance, and features like hooks for managing state and side effects. Redux is a library used alongside React for efficient state management across components.

Uploaded by

kaushikreddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

REACT JS:

--> JAVASCRIPT LIBRARY


-->OPEN SOURCE
-->FACEBOOK
-->WEB AND MOBILE APPLICATIONS
-->CREATE SINGLE PAGE APPLICATIONS.
WHY ?
-->COMPONENT BASED ARCHITECTURE
--->VIRTUAL DOM INCREASE APPLICATION SPEED,PERFORMANCE
-->EASY TO LEARN.
JSX: -->JS+XML --> HTML LIKE SUNTAX WE CAN WRITE IN JS

COMPONNETS--->FUNCTIONAL,CLASS
PROPS -->PROPERTIES OWN

CONDITIONAL RENDERING --> CONDITION BASED CONTENT SHOW ON WEBPAGE


REACT EVENTS
REACT LIST
FORM HANDLING
FRAGMENTS---COMBINATION OF ALL CONTENT LIKE ATTRIBUTES,TAGS IN ONE COMPONENT

COMPONENT LIFE CYCLE METHODS--->TO MANAGE,MANIPULATE DATA OF CLASS


COMPONENT ONLY.
RECAT HOOKS-->MANAGE DATA EVEN WITH FUNCTIONAL COMPONENTS
REDUX-- IT IS A LIBRARY , WHERE WE CAN SHARE THE DATA EASILY

SOFTWARE 'S REQUIRED--- NODE JS PLATFORM - WHERE WE CAN EASILY INSTALL


PACKAGES
VS CODE
BABEL: CONVERT THE JSX SYNTAX IN TO REACT SYNTAX.
CLASS COMPONENTS-- CLASS CLASS NAME EXTENDS REACT.COMPONENT

EXPORTS -- NAMED EXPORTS


FRAGMENT-->BY USING THIS WE CAN WRITE MULTIPLE SIBLINGS
PROPS-->PROPS ARE PROPERETIES WE CAN CALL THEM PROPS.NAME ETC,, FOR CLASS WE CAN
PASS CONSTRUCTOR
EVENT HANDLING: IT IS AN ACTION/EVENT PERFOEMS IN A WEBSITE.

MAP METHOD IS USED TO RUN EVERYITREM ON A FUNCTION IN AN ARRAY. and generate


lists.
STATE: CLASS COMPONENT INFORMATIC DYNAMIC RERENDERING
USESTATE: FUNCTIONSL COMPNENT

HOOKS: they are the functions which uses in functional components to act like as
class components

USE STATE HOOK: it is a function where it is to add state in functional components.


state is just values or variables of your component.
USE EFFECT HOOK: it is used to perform side effects in our component
side effects are nothing but they are actions that are outside
from the react/browser
we use it when we need outside from the react components.
for ex: fetching an api, updating dom,set timer etc..
useeffect(callback,dependencies)-->what to run, when to
run
has variations--> with outdependenncies,-->it runs with
first render and also runs when anything changes
empty array---->it only runs on first render,
variables--->it runs on first render and runs when
variable change
USE STATE HOOK: it is used to mange global data in react application ex:global
state,themes,services etc..
to create context--> crate,provide,consume
USE REF: it is used to access dom elemenets and also create mutable
varaiable which will not rerender
USE REDUCER HOOK: it is used to manage state in our react application.
when we have a lot of states and methods we use state reducer

USE LAYOUT EFFECT: it is same as use effect but it is printed before the dom is
printed on the browser,it runs synchronously.
most common use for dimension of layout.
USE MEMO : used to apply memorization in react.
it improves performance of our applications
removes unwanted functions which decreases performance
const memoCaluculation =useMemo(callback,[dependency])
USE CALLBACK useful fro functions for preventing on recreating ,rerendering.
same syntax as memo hook
returns memorize function
CUSTOM HOOKS: these are reusable function, created by user
it is used to store code and we can call it many times.
REDUX: IT IS A JS LIBRARY, FOR SIMPLIFY THE STATE MANAGEMENT TASKS
STORE,REDUCER,DISPATCH,ACTION
to synchronize data from one component to another component

redux store: where all the data in the components of applicqation stored
in js object
data flow is transparent

REDUCER IS A FUNCTION WHICH IS USED TO UPDATED THE STATE AND RETURNS


DISPATCH-- IT IS A METHOD,FUNCTION ONCE WE CALL THE DISPATCH IT CALLS THE REDUCER
FUNCTION TO MODIFY
WHEN WE CALL DISPATCH MRTHOD WE NEED TO MODIFY STATE SO WE USE AN INPUT CALLED AS
ACTION.

You might also like