score:1

Accepted answer
useEffect(() => {
    setValid(value)
}, [setValid])

score:1

const [valid, setValid] = useState(false);

useEffect(() => {
   setValid(true);
}, [setValid]};

Related Query

More Query from same tag