score:4

Accepted answer
const Example = (props) => {
  const [name, setName] = useState('valentina');

  useEffect(() => {
    setTimeout(() => {
      setName('jebediah');
    }, 1000);
  }, []);

  // ...
}

Related Query

More Query from same tag