DEV Community

Discussion on: What is useRef hook and how do you use it?

Collapse
nibble profile image
Joseph Mawa Author

It is up to you to decide which one of the two to go with. The reason why people go with null over undefined boils down to the difference between the two. You can read about it here.