useRef

A collection of 1 post

Complete useRef() hook with live code examples

What’s up with hook? returns an object with a property. This property gets the initial value of the argument passed to useRef hook. The reference to object will persist from render to render. Is useRef hook used only for accessing Document Object Model(DOM) elements? No, useRef hook can also be…