The following code works perfectly :
import { useState, useEffect } from \'react\'; const Main = () => { const [ form, setForm ] = useState({ error: {}