composition-api icon indicating copy to clipboard operation
composition-api copied to clipboard

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

Open bigggge opened this issue 3 years ago • 4 comments

setup(){
    const a = reactive({})
    // set(a, 'testValue', 1) // worked
    setTimeout(() => {
      set(a, 'testValue', 2) // not worked
    })
    return {
      ...toRefs(a)
    }
  }

bigggge avatar May 14 '22 06:05 bigggge

i have the same problem.

jelle-r avatar Jul 11 '22 14:07 jelle-r

Stale issue message

github-actions[bot] avatar Sep 09 '22 23:09 github-actions[bot]

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

xiaoxiangmoe avatar Sep 14 '22 03:09 xiaoxiangmoe

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

jelle-r avatar Sep 14 '22 12:09 jelle-r

It may be related to #580

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

shrpne avatar Nov 02 '22 15:11 shrpne

Stale issue message

github-actions[bot] avatar Jan 01 '23 23:01 github-actions[bot]

not stale

shrpne avatar Jan 02 '23 05:01 shrpne

Stale issue message

github-actions[bot] avatar Mar 04 '23 23:03 github-actions[bot]

not stale

shrpne avatar Mar 05 '23 09:03 shrpne

Stale issue message

github-actions[bot] avatar May 05 '23 23:05 github-actions[bot]

Not stale

shrpne avatar May 06 '23 15:05 shrpne

Stale issue message

github-actions[bot] avatar Jul 05 '23 23:07 github-actions[bot]