0% found this document useful (0 votes)
38 views4 pages

REACT Basics L Notes

Uploaded by

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

REACT Basics L Notes

Uploaded by

Sameer Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
vitor \ ardor clock eolty> J 2 Them nomel © {response Cor] elem Moma YD €114 99) éollvS ; s => But whet bappow when ‘we- do this Litem “vowel * = “GoesponseCe.Hemfbml L am Rishabh TW will not be To make this nistble, we viaible: need to odd this in wemjs file Aus Cp clorshlane ~'yflishab"> £ itemNamey

< propo. children’ eta A REALT Evins: Horde! evors with React elements wv very similoy 40 reveling events on DOM elements, Reoet boy the cone events as ETAL! clicks chores mouseover eles CAN the: events start with oon WER onlicky ete)...» PPMP 2 SPP PKK PK HTHEFHKKPRPPEPEFRFEFRETEVEL eove ° COoveeebddddddddd ddd rl > React events ave wrrllen. 19 cowne| Cae syntan : onclick — twasteool | onclick « > React — curt handles ave written insicte corly races | ondlick =Cchoot dwyteadl l onclick = ‘ishootQ)". 8. Wheat happens yaohan y Wee UdL onclick soot OY prop twstod onClick =echooth prop ? In dis wx the uncton achoot) evil Be calli ond ve watt seatl “qunetion avin 4 "* pedidint clicked on - bolton » Hooks A heck Wea cpectal qenetion rot betsy You “hook txts” Reoct istoras: For Axomple , bette wa ook thoct Lets you adal React state to qenetion components « ae USESTATE he Regret ueteche Hobdl | allowas us to hack State. ty 0 quretien com ponent « This hook in vdael tor atorivg variables Hot are Part of your applicection's late ad watt charge om tha user ivtlevact, with Your websttes The cterte chav hoppow per component Wwatance — oa + Sterta ts vad when we warth do manag chonging dota wn on axpplicaction « Ox. We netd to import voettate djivst- pe L 5 © Wmpert LubeStectey “deem react" foretion Fovlolort) of e e- - e . ~ . e e comt Cooler, cetlolor] = useStecte ('")) * fo : tig Pa iM e color We ove | fUn% thot coment leh MS ubed: to e. e e e e * € ¢€ € ¢ € g g vpdate evy Stoche w TS uncSlerte ww cuxnehroneus hook « Ht wlll eaaid for Aha component do finish ito cyete vemvondey wand the it will updacke the ccrerhe. why comt ip used and stil] the value Chavet 2 ¢é Oobeedad evened When a component “we verdevedl the qornctin 1S mrecuted again: creating a new ‘color’ Nartable » which hos nothing to dp wlth the previous vartable: opie onCrange This evant in REACT detects when the valve 44 an input — elanent changes. ae Lifting State Up Shore wstete ts accomplisheal in mae we up to the closest common — qnewstor (pernnt) | the components that neel tt. Posverct david Sep 4: Fyunetion will poe pawel ™ pavort oe chilol, Step 2% Function will be calleal in chitel compenart with input parameter « Step 3! Valve will be accerseal *

You might also like