DEV Community

Discussion on: 8 Useful Practices for React Apps You Should Know

kip13 profile image

From docs:

The only difference between useRef() and creating a {current: ...} object yourself is that useRef will give you the same ref object on every render.
Keep in mind that useRef doesn’t notify you when its content changes. Mutating the .current property doesn’t cause a re-render.