Skip to content

How to watch/$subscribe getters? #1227

Answered by varna
varna asked this question in Help and Questions
Discussion options

You must be logged in to vote
  import { useMapStore } from '@/stores/map'
  import { watch } from '@vue/composition-api'
  import { storeToRefs } from 'pinia'

  const store = useMapStore()
  const { FeatureCollection } = storeToRefs(store)
  watch(FeatureCollection, handleUpdate)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by varna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant