Put in order · Vue.js course · Module 11: Pinia

Store Elements in Composition API

Arrange the elements of a Composition API store in the correct order

Items to put in order

  • const getter = computed(() => ...) // getters
  • return { state, getter, action }
  • function action() { ... } // actions
  • defineStore('name', () => {
  • const state = ref(...) // state

You can check the correct answer by solving this task in the CodeWorlds game.