[Vuejs]-How do I render a list on API response in vue 3?

0πŸ‘

βœ…

To be reactive a variable must be wrapped in a ref (or reactive (the difference is not important for you for now)),

in your case, init your variable with an empty object

import { Ref, ref } from 'vue'    
let yaml: Ref<ServiceAPIResponse> = ref({})

then when you want to assign new values

yaml.value = data;

Leave a comment