React Tutorial - 30.useRef && useImperativeHandle

Опубликовано: 24 Март 2026
на канале: feeco
22
0

1.useRef -- is a way to create ref in function component
a.store element node and focus
b.store a component instance

2.useRef is used to store special value which could cross lifey cycle

3.useImperativeHandle
a.forwardRef() -- is a higher order component used when parent component want to control elements in the child component
b.useImperativeHandle limit the control of parent component , limit what parent component can do upon child component