Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

fs "

React
a
evmple
Const
"JSx witnnoernbe euninbr Why consi
s
9 JSx Comynent
tay eensig
s gcnasempt Syntoxstands Onenlas
nhle han cle
d SoeChem
gs* any uoto rahiy bne
heaslymnmal hir ina
d
ne s eta this
wil
eaessim tanplatoJavasunipl
Gavasnipt rmt
celanhne
o end Linom
hone Senple
eguo xML uhrany
asu Ssx4hiy am
wnwpthet
mapsu
J5
pobuphia ba elounw
Cloahihwle hewmes classNam im
"HNL
atibnes Canhe med wn preli
"Cuslo
dota-*
Con he spenbed
#hnbuos nelnes
wleras pantelement
wameel wiha
"Camento can he
Rrerendngomubipe lay
Cmnenh
Allos Comnen
4SX ne wrapred im

Reactvintuol DoM

Qoadvonßago

agein

hat entina tneogine


So tho eney ohet
objeu
Hovv vin Molee

>tCAcatey o mewheeneenentlin inte


Cunpicalin whononen eo a changeimhe

loeny me changn yhe


nenim beeo nenelod n hne
element Cne
wndo

Curentvinma
Du'ng '- (he pmm eompiny the
DoM itn ne me vus

manatadoy miost
pet and sat e OetdoM
ensuine not
tuLeenoler he
butenwpdote,

VntualDoM
.ree epd, tTnMeelent
ght meht Copyreod
"
Neinnuelby shs "mmain tuinedbyhwwes

nends ehanged olnt


"ndat ne updoles me thecy neyt
me heWeg
Doos Doy

notelemónhela

neb py mampulahy Dog


wy
ellrt
lk enab
yhy neat DoM

lmmoune pefomonle
manyuoiy and

pSunctwy ay necl Durt


endeO:0ned the amost mptet omesvichc
logacl
Rouet Duy mecdtu vwnda Sineg
Cumpune
Roa Compuen
where honhulon
mesnned

:midt inmounY
unMoutlomponentA oclo t2 thehwey
t umunt
renone cuenoa
JUncaa pwhulo Contine

mmeh d eqwi hle


dat
tdy y: this em ndedu
memd hyt
hote pnt0:kalw
the Curyent Du
net

Aect gs i t
hunehn ato omd

Creating end Jhonen[mcg clnt


. LatCne e

a y s Ond tu map Bunelis


miny

Dendnayto ingcde cumponent:


Ina sOcwmendoltuenu t ne
Corenh

U e n d e n a t DÙ M

ytuanne

mdo Ddevtly chans, updety


keynane
clelots iaant
ina
b HTMLho kuwm dotu iouiuoly hemdled hy
suvedinthe
the nenlen

Conhulle l compurab hehut


stute Cortnola
Compinas
hhee he Comnent
colecoted
elemonb ne

cllibe younecda
Keyna Spea shey elmaiy
Indhens lcline sha whiils
o (oloiy
weoLt. key re ned
|nthe t oe changednupdited
dolel
amome sibim
he gne
4 llugnas)- keyshildwt should
element lnnan Cory
eatb
angne lceyto help nedt dohns
hav
Aum onothe nendes
2. tabluly :- leoys Shol dbe sable aervss

joucenendeng
ddt chaneroush
sameleyy Consýnt updole

Dende imols

Dyleon bla leusrups


-Not Same n prps

atee (omsido d the componenes le prps

oher p wmeane passiney e


Camponen

Puudss aels
Debs ea chunhmvicld by
acces he DorM olomevd anel he aect ee ent

wtto chci
heya nedn cases whene cherge
hualed,e chld com ponnt,wlo wnain
prps
tomnonly uced iy actessin gt
cdues fusing elameno ggerin animains
Qnd lnlogna witn non heart ihanes orAn

reate nef
(omoonents.youcan use the usene!
In unchonal
reatt tee Qnd manage nefs
howl to
Aeat, juse aef? fruy 'eatt';
tmpont
funchoin NyComponent (){
tonst myef use Refo;
3
Ataunthe aef toa Elment
otknn(
"ax" ned"myRef}/>
<input tyre
<buton on(ick:ousln put}>otuslnputb
Aceessngnehef
Const ouslnput ()
myRef.cunnent.bcus();
usin thind-ponty ibnaus
» elpul ahen
>Helplul in animaions
onanagimy btusomedia playbuck ytort
eliphul tn
selaebiom
ss Rendering eoments
Dead
Chveate Aoat eewovt
cont elanernt K oAny Helo,aead<Mi
Renoleelemt ím Du

impt aea tRrum neat


Impnt aoatDog fum eadoy'
Daad Condahmel ndimg
Operaty

pywelom uen!zlpy:pleaadp
iologgedln 9
<p ploa logtnatp>}

22 Onenalw

Koivy

33 Usna 4 staleth
(isadmi

3
UsngAnivn cous
4
lortion Gnectine (tinttswinaß)
tort goóneting (üMnmy) >
neunyChood Nnng/

aetum py hood mny 4/p>


/p

nehn iv> gt mehy (ismm ny)34)ca

Ce' a b t
Code splittig
optmize elgmane by spluthy yaur Jovalnit
bund nto Smatey Rus. nene Smaller ies
olky nefeed o as chunks one louded n
geducimgthe iihl, me et h
Semand
ujey eperRnlQ
appliatioo Cud Onvng
Using impogt(9fy dynammelmponts
$suspence la2y hom neau':
tmpont Rseut,
lazyomporvt lazy(0>mpontl Aaylamp
Cont

<Suspense
ALaeyCmpurvt
uipene

falba ck
Susnene: naoat eumpo nunt hotculowsq
u whle te dyne m1ta ly tmptd Cumpundis bad
(ozy! nauntin hat cyrammitalhy impatythe cumpn
mpnreclpeabomen

Deat 5s compunnt
components i mnginqawd those
’ CompoSing aporent Compont
lndivwda eom ponsvs tonake

necompsng componevts: Precak ng douwn the compo



ment into smaller componento

um wondb a tescuicn
ttauiam tonk
btle
eompue ho compononsand senerale e
Input anel Siubmi butos om
Reat )5 Rune Components
cs amhcuy
Conmpononthot
lyne wdomporut ipdate'mtnod,t impe
the should cuvendy
whethu kaoc comporont
mups and state
ib
bane donchanges to
pohma shallow tompaniy
"Rne Components
steteyclnis a toplnel w<o
u4 fnps Gnd
nEUnSnelychedcinymestod obectge onay

toeat class hased Rne lonponnis


laut. neom
cless myPunelomporund eund

umhnad Rrne Comporut s uynyoeuy


tu neati
mimo
nyaneComporont - Rract.omeno umc
Cnst
Nyfnchond Conipunint yaps)3

’ Uselul when you want o menent nncessomy


ne-nenduns in ouY appi catiy
Can ensne hotwpdatsoCeors Onyhnn y
Raad gs nchonol
Components

heneane
hee ho
ane omedhe more Commur
comwn Corpt,
will Camo acwoss while wno invuit
d
Sunhiy
Simpy
Pooming funtinaw lomponon
Funbiom! Conmpanonh luclo cms(antcmud
3 Beoey cn comprod classband eompone
mto &tey domd hane aeessto dodicatecd
Steto ncuosy ihë ciass-benec componn

a Spe ueU Roaus Conupt cale d hoks

Leyel 4 a comporant can he cubnedcte


Sesis methoc hot ae 1mmolledim dullert
Skagnd thecomponenh entanu

Covhued wineqinrops
and dagowl stote
byrhe aendo omatod itnel!
io tho skgcw hesho statoc
Updatling damg
updat d
tomponend is
a hecpplicalisn

funthunat ompunonts vs class Component


eluss Comporen
-tunctoral omprurt,
equines you to ethe
> ai g5pune kuvehrbut hune neact Compoent
poups
angument hottum Reat Chectosuevder tunin

’ heney moUndemth Nu hen enliy b


ned inhunclu ometnod otuaning5X
Cononto
9Ato stetebn Conmporadh
Smony aef datoy
TheinSume

tousCon be eoniyned lesscumpora


’ tolmplovensnolg
Peatgs cont cimer anl Doegntaional
patn in lomponono

hesentiwna Cnd coninn Com onen


componenh ncle uelidby comporot
co
hetyne o,
ompnon oeucl-hate
uy tne
dalu i l he renelid on ne Snee nitcale
Cy nerennel Campunent

he
Coveinn Compon

Dat Pps
Pous (prvpesus) ne hndamovtul coxoptued
dotu tum
Chud comyonn hey culu youtu oe
UwWeable

ie he hehaviDnaMol appcainLeee
'cuy eompuntn
fasanydala data on con
puss douta' On con ynati
ane ueys too puss
Poops
valuhoma
chuld componnt
Imudabl amdveadony
De acthile lonponenteuemenppsucon
constcLnedtnnmke
heyane chany clwit
modaly homeans eycannothe
nhei
rhe comprun
Dekongbwnimg mup! agojso]/
mum "john"
Kehdd omponont
Vundinod Lomporund
Childompovtnd(prop
knetm
netun

div>
chwhenpro
ddlwislopung PoupsDmamepps You
drso
<lord laln, the
fenametey
arctne
Compunn, tc
pevnt an
he rvlo
'heus',
cmpurntckcona dymumi
clabas
cand
doayouos
Simngu chawge valwsn

updole
sleanmtn
hen
d
mtne
cda'e lnsuat Conpsund hupenend
ommvon
te dolahoon pdatuthe
u oponenh chil means in
h he wayto one e nj cnd u
roammiog neactine
found
in
luw
3
roplrusmumh,
amipwpysshg,
upyres Childomp
nant
pop-reoy hua' Pooyrs tmpont
tinwitpoprs
nons Comp
pass abo cas You
Dou blwin atncT Folw us o
ndia
Roat duent Suppont bicnetnew bindnao
Bo0
dun data 6lun
nalee Sneyon ene bullono a clan
nchitctne ne 'may oy he nolt c
apocnis -lha letea huwsouohong
appin aSmae cluion
bp

Benelty
Gester tw caba,. as me lenow whet dotas lommen
hmhene
e C1
6 m o n e t e s , c n n e h e n enune
mdentteu

houndeiy no eanptu, me Syslens


Poacs Stelo

Can he deln
wnees hct Ce l hhe heheviy came
cl
Cmnont
holo Some le vnat
Onen o ehmocme Cmpvne ntmetmeyehange
o
dunelunel
t lspu gine eolto asHoots
Hook Pheot
gs
mte
d |esteuto
Compornto
funchnol and Stato
nenb stite he Provps
win edcanhe
hestule
amt"t tmmutaba oIt "
utble
tu
anoomponet Onu
componnt (he
PAOPS
TGSTA
hanles ment
Ggcneally sttu he
dy plato -5hhilo
setby One mups
funchm ln h
wmpunorb StelL ’
hane
enh in ned CCnhe
Immudable >Poups
One
fstate paops
han wim eaU tel

sonanss:tuo leslet #yuuto


. Similayng Commpler
compunonintu imeulenuny
Sntone nhapuesam sellee
"bucm

Rules tor using, hooks


Dnytuneuno co punnhComuse hoc ky
*Cauiny od hoot shond alwcuys he dun at
b len od compovents
. Hboles showdnthtucle Condun stzlo

Reatyshestate huuby
(he bookotukos oma imtil steukoand sw unnn
tuoalne ist valne Cntns hne
Stute ond sewnoye fun ctn whichupdat
Strla
>wvale seel in Sat wil he heccta dus

tunot [vay SetvovJ÷wnstate()


whot is helet hook
Uneelleet hoole im ouat sned tu handlo

Qududadng Dot
Ronn to chuwe wle hook
tionad t elimimato the side eleub
clens baned componunto

ubipns
fomapi endrpont, se hngup wavtt Siela

es
.

wonynd conhag scle ellet in ueelle dhouh


pass
|. Go un use EFfet in evey nendon domot

tn ipenden
ucetet()

3, c

tn ha
yln puss the stete amd po
dapenduon
3,Epvps,stuto J

Roacd ortent
eohne hat pruvclny wey oshone
dol acemuls aempvant ee wo e
posing pps mougheuchleneld, he hei

Pontdn: e ondet.Prou dn compuneny

Com pononth w hin tnot vee on an puss


daken as a f
he madu availab tD Cwnmig cumpunny

You might also like