Question · Vue.js course · Module 11: Pinia

Getters in Composition API

How are getters defined in a Composition API store?

Answer options

  • As computed() and returned from the function
  • In the getters: {} object
  • Using this.$getters
  • As regular functions

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