DEV Community

Discussion on: The Mysterious React hook: useRef()

matthewpardini profile image
Matthew Pardini

Refs can also be used to store variables for use in useEffects when you don’t want that variable to be in the dependency array.

exploreraadi profile image
Aadi Author

Wow! Thanks for filling me in. I too have just a decent idea about it but considering the time I wasted on understanding refs, I thought a simple article might save someone else's time.