Level 11
You can if it fits your context. But there's some difference in using them. This might be helpful. https://aschmelyun.com/blog/when-to-use-ref-vs-reactive-in-vue/
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
On the example from the vue js docs, we can see that it collects these states as refs. Should it be collected like this for a form or as a reactive object called form for example?
const text = ref('Edit me')
const checked = ref(true)
const checkedNames = ref(['Jack'])
const picked = ref('One')
const selected = ref('A')
const multiSelected = ref(['A'])
const form = reactive({
text: '',
...
})
Please or to participate in this conversation.