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

MRevanh

21821A\238
AT ASS\ÓNMENT -| TT-A

t«plain ho ond chy ce coud Ee psopesty clecosatuxs irTs?


Poopety de(aatuxs n yresspt axe a poeful featuse that attos
develqes to atd metadata, modify (orobsenve the behauiog of
opestes cotin a cdass- they can te ed tos hOuS pusçoses,
Ireuding alidation,logcing ood deperdeny injetin.
ttouo to use Papesty ceatoEP
(· Erabe Expenental decoctoS
2. Defe apuopety Decoscto
Tt i9 atuncto takes too pataretexs
laget : patottyre of class ox lnstane menbers,ox te
Con stultox oneton fox Staticmebeys.
propestyleey he he nane
of-
Ex 1 popesty
func
tunebion logteopeaty txgetsony, ro estykey :stingi
|et alue =
taxget leayexty kajl
Con st qetter =())

Console-loqC
xetim value;
Getter fox $ Roonesty key etumes
$fvaue )
Const Settes > neal:on ) E
Conole.log ^setter fox Pöayestykeyy Set \alue to 4fre Va)
val ue- e a
class

qet s gettex,
set: settes,
Cnanerable true,

3);
3
Arely De orator
DeovatosS ae amted usiny e Srol
Syol cbowe the peoper ty
declaratKon.
Class Exampe f
Ologfesreaty
pubic name 3stirg;

Construtoc (norne 1sten)i


his.nare norre;
Con st
exarnple ne Eycnle (ohn Doe'):
eKanple.nane 'Jane Doe'
Console loq (exoonplenone);
:
ee use pbopecty Deoetoxs foc:
dy aeadata Arnnotaton
otesty DecoratoS Can add rnetadeta to
be usetul fx operties,Jhich can
fneKS libxaties that need to undesstad
ox
stuctuxe of o r cesses
d Val dation

lis) Dererdencginetion.
classity the exet tynes of to iht Arautar Suotox

fyuy Sumosts tuo mityes of forrt:


Tenlate-dvenfors

Template-Drveo forns:
Tengate-dueofoms are stratfo noard E use Angladxecess
to cyate. manaeto n.1hey are ldeal -fox Sinpletorns
loqiC can te direty e mbeddedd wtthin temlate.
enbedde
hne
Er:

htnl

clebel forcne'>arellabel>
Cinput dncinel

clabel tor'ernail >Enal | label>


clopt idsemal nome email' namodelegised email)

Cbutton type'Sutmits Submtt <l but ton)


4fons
tygeset
1mport

Selectox :app- tempate foom


tempteU\: Aeraote--fon otomfonent .htrr
3)
enot Class Tenhte For ornporent
onSubit(tsmiNgtorrn)
Peactue Forms

sDbust &Scalade heupie greater coContl and


fexbttae
osm behavio &data
Zhn fornp]fon' (gscait)-'onsubmitSS
2abel torane'Name labels

gei(rome)
tlane iSxegutrd touched '>
<ldivy

<latel foxenál'Emal cliabet>


Clnput id lenail
rgontronkire l ematl
-qenlmai)
touchet^S
<buttn ujpe stontt Submit <\bttn

3.
Fxplain hotofeth the data, wth AxiomS ín
React.
o fetah data eoth Axies in a React
Qrcaton ollow these
steçs
i) install Axiog
npm install a xí0s
9. 1mpot Axio

Impoxt axios snaxios':

3 Fetch cta wlhn Axios


iS to
fn fth data torn Axi0s
MOst (ommon Aronath
Use UseErect

EK:
Peact, FuseStete, useEPrect

\most axoS -fom 'axios':

(onst Datafetch

Const data,se atilo se State cC3):


stbading, SetLodiql setate tuey
Con
Const esos,setEosJ-usestateCnei:

USe Efet(C=S
Const fetchata asc C)>
ty
Const sesonse aut axiosqet (^https:Ilapiexome Com/
Sektata (sestorse. dota): data'
SeuLoadirocfalse)s

SetEos (exDs);
Setlocdm CGlse;
fetctaC);
3,3);
clhly
his Fetehed Data

i detamaplite)
fiten-idytematue

exurt d efuut DataFeth;

You might also like