vuejs / composition-api

Composition API plugin for Vue 2
https://composition-api.vuejs.org/
MIT License
4.19k stars 343 forks source link

Can't set new reactive key using 'set' function asynchronously #933

Closed bigggge closed 1 year ago

bigggge commented 2 years ago
setup(){
    const a = reactive({})
    // set(a, 'testValue', 1) // worked
    setTimeout(() => {
      set(a, 'testValue', 2) // not worked
    })
    return {
      ...toRefs(a)
    }
  }
jelle-r commented 2 years ago

i have the same problem.

github-actions[bot] commented 2 years ago

Stale issue message

xiaoxiangmoe commented 2 years ago

@bigggge @jelle-r Can you provide me a minimal reproducible example? How do this code perform on vue 3?

jelle-r commented 2 years ago

I am not able to provide an example anymore, since we moved to the vue3 stack in the meantime.

shrpne commented 1 year ago

It may be related to #580

Test case: https://codesandbox.io/s/beautiful-feather-qrjq4n?file=/src/components/TestCase.vue (computed property not updated)

github-actions[bot] commented 1 year ago

Stale issue message

shrpne commented 1 year ago

not stale

github-actions[bot] commented 1 year ago

Stale issue message

shrpne commented 1 year ago

not stale

github-actions[bot] commented 1 year ago

Stale issue message

shrpne commented 1 year ago

Not stale

github-actions[bot] commented 1 year ago

Stale issue message