Slide 105
Slide 105 text
• Components
a
nd Hooks must be pure – Purity m
a
kes your code e
a
sier to
underst
a
nd, debug,
a
nd
a
llows Re
a
ct to
a
utom
a
tic
a
lly optimize your
components
a
nd hooks correctly.
• Re
a
ct c
a
lls Components
a
nd Hooks – Re
a
ct is responsible for rendering
components
a
nd hooks when necess
a
ry to optimize the user experience.
• Rules of Hooks – Hooks
a
re de
f
ined using J
a
v
a
Script functions, but they
represent
a
speci
a
l type of reus
a
ble UI logic with restrictions on where
they c
a
n be c
a
lled.
Rules of React