Im trying to use react-input-mask, but having no success, I can’t type anything. I was getting an error related to React Strict mode, but solved it with Ref Fowarding. Now I see no errors, but still can’t get any input from keyboard, what am I doing wrong ?I’m using a functional component This is my code:
import InputMask from "react-input-mask";
const InputMasked = React.forwardRef((props, ref) => (
<InputMask
placeholder="Digite seu nome"
className="register-input"
mask="99/99/9999"
value={name}
onChange={(e) => setName(e.target.value)}
type="text"
/>
));
const ref = React.createRef();
<InputMasked
placeholder="Digite seu nome"
className="register-input"
mask="99/99/9999"
value={name}
onChange={(e) => setName(e.target.value)}
type="text"
ref = {ref}
/>