So I have an Object that is empty and after the user submits the value, it is saved.
let state = reactive({
id: '',
name: '',
status: 0,
}
after the submit, I would like to save my values.
onResult(() => {
state.id = '1'
state.name = 'Name'
state.status = 1
})
I would like to swap the complete object like I would do it in a ref, like:
state.value = {
id: '1,
name: 'Name',
state: 1
};
Is there any shorthand when using reactive?