Put in order · Vue.js course · Module 11: Pinia
$subscribe Flow
Arrange the stages of the $subscribe execution flow
Items to put in order
- }, { detached: true })
- store.$subscribe((mutation, state) => {
- localStorage.setItem('data', JSON.stringify(state))
- console.log(mutation.type) // 'direct' | '$patch'
You can check the correct answer by solving this task in the CodeWorlds game.