[Vuejs]-Vue composition API store

0👍

You can use reactive instead of ref.

For eg.

  • You can use
    export const rctStore = reactive({
      loading: false,
      list: [],
      messages: []
    })
  • Instead of
    export const loading = ref(false)
    export const list = ref([])
    export const messages = ref([])

Cheers!

Leave a comment