Question : Type 'MutableRefObject' is not assignable to type 'RefObject'. Types of property 'current' are incompatible. Type 'undefined' is not assignable to type 'HTMLInputElement | null'. TS2322
Answered by : important-ibis-is1gq7d74f03
const inputField = React.useRef() as React.MutableRefObject<HTMLInputElement>;
Source : | Last Update : Fri, 02 Jul 21