What is the correct way of updating state, is a nested object, in React with Hooks?
export Example = () => { const [exampleState, setExampleState] = use
You can pass new value like this
setExampleState({...exampleState, masterField2: { fieldOne: "c", fieldTwo: { fieldTwoOne: "d", fieldTwoTwo: "e" } }, }})