DEV Community

Discussion on: Basic Hooks in React

Collapse
 
jwhenry3 profile image
Justin Henry

It'd be nice if you included some info on useRef too, as it can be used for more than just storing dom elements. I typically use useRef when i need to retain values that should absolutely never impact renders. This helps when you need to reference a value during actions in a component or deal with application layer objects that are just under the surface.

Collapse
 
mursalfk profile image
Mursal Furqan Kumbhar

Yeah, it is. But since this article was all about the basic hooks in react, so I tried to keep it as simple as possible.