kingcoyote85
Calling a composable from inside computed doesn't call onMounted
I'm using Nuxt3 and Vue3 and having trouble getting my composables to work properly. My composable contains an onMounted() call, but that call only seems to work in certain situations. My composable, useSableCan, calls setInterval inside onMounted, and clears in onUnmounted. When I call this composable from the root of my SFC steup script, the onMounted works and logs to console. But when I call it from inside a computed function, nothing... here is my code. Any thoughts?
2 replies