I am migrating Vue2 to Vue3. For this, I want to start the changes that Vue2 can handle. So here are the changes in Vue3 lifecycle:
So I want to apply these changes and add setup, before I move to vue3. I see that Vue2 already handle with these changes because when I see the components, I dont get any error but I still wanted to ask if I already add setup() and add onMounted inside of it instead of mounted, will it work for vue2?
As an example:
setup() {
onMounted(() => {
...
})
}
will the example work for Vue2?
