35. useRef
useRef is another react hooks. It returns a mutable ref object. This object got a .current property that is initialized to the passed argument(initialValue). If we pass a ref object to React with
, React will set its .current property to the corresponding DOM node whenever that node changes.It is very useful in setting an input form with different values and send them to the database.