core icon indicating copy to clipboard operation
core copied to clipboard

reactive issues with external library works in Option Api but not in Composition Api

Open mgambill opened this issue 5 years ago • 1 comments

Version

3.0.11

Reproduction link

https://codesandbox.io/s/wizardly-curie-olkqv

Steps to reproduce

See code sandbox calling the api results in the component not rendering using composition API.

What is expected?

all APIs should work

What is actually happening?

only Options Api works


Note: I also had to wrap the results in JSON parse/ stringify to get raw JSON object as the models being constructed were causing reactive errors. It appears the model has functions and other properties that Vue doesn't like.

I've been using Vue 3 composite API for months this is the first time I've ever seen this.

mgambill avatar Apr 21 '21 05:04 mgambill

You must use async setup with Suspense component https://codesandbox.io/s/hungry-bash-vczqp?file=/src/App.vue. Otherwise, setup cannot be async.

HcySunYang avatar Apr 21 '21 05:04 HcySunYang