Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vue3] beforeDestroy has been renamed to beforeUnmount #15

Open
stritti opened this issue Jan 27, 2021 · 6 comments
Open

[vue3] beforeDestroy has been renamed to beforeUnmount #15

stritti opened this issue Jan 27, 2021 · 6 comments

Comments

@stritti
Copy link

stritti commented Jan 27, 2021

Using vue-crono together with vue3 there is a warning:

[Vue warn]: 'beforeDestroy' has been renamed to 'beforeUnmount'

@BrianRosamilia
Copy link
Owner

So do I just need to update this? Seems really strange that they would make a change breaking to vue2 when vue3 hooks make this irrelevant dont they? @stritti

@stritti
Copy link
Author

stritti commented Feb 16, 2021

Yes but at least the naming is more clear now. The hook is not irrelevant. It is renamed:
https://v3.vuejs.org/guide/migration/introduction.html#other-minor-changes

@BrianRosamilia
Copy link
Owner

Yeah I'm gonna need advice on how to fix this (or a PR) because with my build pipeline I cant even build against vue 3 since the vue-template-compiler stopped being supported after vue 2.

Vue packages version mismatch:

- [email protected] (/Users/brianrosamilia/vue-crono/node_modules/vue/index.js)
- [email protected] (/Users/brianrosamilia/vue-crono/node_modules/vue-template-compiler/package.json)

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

And it doesnt work if I install "@vue/compiler-sfc": "^3.0.7", because parcel has no idea what this is, so it tries installing the vue-template-compiler which has a max version of 2.6

Can I fix this issue just by having 2 methods on the mixin called beforeUnmount and beforeDestroy that do the exact same thing? Or does the current backwards compat try to call both of them? @stritti I would be willing to do that if so, but if not, the build pipeline is going to have to be redone, perhaps with parcel 2 beta

@polinwei
Copy link

polinwei commented Nov 23, 2021

The plugin is really useful. Do you have a plan to migrate to Vue3?

@BrianRosamilia
Copy link
Owner

@polinwei hey, thanks for the comment! Vue 3 requires you to rework how you think about libraries like mine.

Good news though--there is what appears to be a great continuation to my library in vue 3! https://github.com/riderx/vue-timer-hook

shoutouts to @riderx for doing what appears to be a great job on it

@riderx
Copy link

riderx commented Nov 25, 2021

Thank's @BrianRosamilia for the mention !

Your module was a inspiration to build something in vue 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants