DEV Community


Discussion on: Basic Hooks in React

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.

mursalfk profile image
Mursal Furqan Author

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.