Your state is:
{myObject: {
name: '',
email: ''
}}
But you have not updated the value for MyObject.name in inputHandler. First, you need to create value in your first object.
Hence, the outcome will be:
{MyObject:{
name:'',
email:''
},
name:yorurInputValue
}
Now execute this:
useState({
name:'',
email:''
})
Hope this should work!