Put in order · Vue.js course · Module 9: Composables & VueUse
Reactive Singleton Lifecycle
Arrange the steps for creating a Reactive Singleton composable:
Items to put in order
- Return readonly(state) and methods
- Each call returns the same shared state
- Add methods that modify the state
- Create the composable function use*()
- Define reactive state OUTSIDE the composable function
You can check the correct answer by solving this task in the CodeWorlds game.