Closed vincenzoraco closed 2 years ago
I had to use reactive to get it to work. It seems like ref() removed the functions on my form? Not sure, but it worked.
import { reactive } from 'vue'
export default {
setup() {
const form = reactive( new Form( {
name: null,
} ) )
}
}
It is not an issue therefore I will be closing this ticket straight away, but I just wanted to let others how to deal with Vue3 reactivity:
Just wrap the form class instance inside a ref so it will reactive. You will obviously need to call functions and properties using
form.value.post()
for example.