Put in order · Vue.js course · Module 6: Components

Process of creating a composable

Arrange the stages of creating and testing a composable from file to usage:

Items to put in order

  • Return needed data and methods (return { ... })
  • Add logic and functions operating on the data
  • Create a useMarsData.js file in composables/
  • Define reactive data (ref/reactive)
  • Import and use in a component

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