Greetings,
I am using watchEffect in a component that is loaded by router-view.
After the route is changed, this component is unmounted.
I was expecting onCleanup to fire at this time.
Is this a correct expectation?
To my humble information, vue-router does not cache routing components, so I am assuming they are being destroyed. If that is not the case, then how can I ensure proper cleanup while leveraging the router's cache?
Btw., the Vue Composition API official documentation is calling onCleanup as onInvalidate which was a bit confusing to me. May be I was on the wrong docs version.
Thank you.