I've to change my current vue code to vue3 <script setup> code but I've problem with watch property. What is proper syntax for watch in <script setup>?
Current code:
watch: {
config: {
handler(newConfig) {
if (this.$refs && this.$refs.range && this.$refs.range.noUiSlider) {
this.$refs.range.noUiSlider.destroy()
const newSlider = this.noUiSliderInit(newConfig)
return newSlider
}
},
deep: true,
},
}
How it should look like in <script setup>?