Closed brolnickij closed 2 years ago
we provide set
and delete
helpers for this:
import { set } from '@vue/composition-api'
// ...
set(states.value, index, !states.value[index])
@LinusBorg was unaware that @vue/composition-api
provided these methods
thank you!
--
P.S. for those using @nuxtjs/composition-api
+ unplugin-auto-import
+ unplugin-vue2-script-setup
, you will have to explicitly import the dependency
import { set, del } from '@nuxtjs/composition-api'
Problem
Solving a trivial problem, using
@vuejs/composition-api
, I came across a reactivity problem inv-for
, namelyExamples
Vue.js 3 | work Vue.js 2 + vuejs/composition-api | doesnt work
--
P.S. many thanks to the vue.js team for developing this wonderful tool