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.
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.
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.