NickDJM
NickDJM
KPCKevin Powell - Community
Created by Rakudai on 9/22/2023 in #front-end
Intersection Observer error
The official docs have some good examples for this: https://vuejs.org/guide/essentials/template-refs.html
94 replies
KPCKevin Powell - Community
Created by Rakudai on 9/22/2023 in #front-end
Intersection Observer error
If this is entirely inside the vue app, you can use a ref instead. Add ref="movingCars" to your element, and then in your mounted() hook, you can use this.$refs.movingCars instead of your query selector- this is assuming you're using options API though. Composition API you'd have to make a const movingCars = ref(null); and then add your ref="movingCars" to your element. Then in the onMounted() hook you should be able to access the referenced element. I would be interested to see if that changes anything.
94 replies