Bereaksi mendeklarasikan banyak negara

import React,{useState} from 'react'

//Declare multiple states as a single object
let [userData,setUserData]=useState({
        email:'',
        password:'',
    })

//handler function
const handleChange = (event) => {
        event.preventDefault()
        const value=event.target.value
        setUserData({...userData,[event.target.name]:value});
      }
      
aus ogola