4 ms·
curious how easy it will be to move from vue 2 to vue 3
by diminish 6y ago
curious how easy it will be to move from vue 2 to vue 3
- Exuma 6y agoIts very easy for users, quite difficult for library maintainers
- gregmac 6y agoThis is a great tradeoff actually. It sucks to break backwards compatibility, but often that's the only way to move forward. If you have to break something, affecting the least number of developers is best. This also gives a chance for a refresh of the ecosystem: libraries that are no longer relevant (eg, their functionality has been incorporated or otherwise made obsolete) can go away, and they get a nice "out" so no one has to feel bad about shuttering a project. It also gives a chance for keeping the libraries using newer APIs, or even newer libraries to gain traction. Very similar to doing a controlled burn in a forest: Worse than no fire at all, but orders of magnitude better than an actual wildfire.
- deleted 6y ago[deleted]
- amitp 6y agoThe migration guide [1] lists breaking changes. If you use many Vue 2 libraries you'll want to wait until they're updated to Vue 3. (I reminds me of the Python situation where if you used lots of Python 2 libraries you'd write your new code in Python 2 instead of Python 3, until those libraries migrated to Python 3) [1]: https://v3.vuejs.org/guide/migration/introduction.html#breaking-changes https://v3.vuejs.org/guide/migration/introduction.html#break...
- Jarwain 6y agoThey're working on a "migration build" which is a version of v3 that has support for v2 behaviors + warnings, which should help smooth any transition. On top of that, v2.7 slated for 2021Q1 also includes the relevant migration warnings, which should help make life easier
- jacob019 6y agoI just updated a 1 day app, it took a couple hours. No Vue.set/this.$set, significant changes to render functions, changes to much of the boilerplate. I was thinking that most of the deprecated behavior could be easily emmulated. The performace improvements are worth the pain, but I have a lot of code to update. Hopefully the migration build will solve it. It would be nice to avoid a python3 situation.
- stared 6y agoEven for a medium-size project it is not that hard. Most things are backwards-compatible and the transition can be gradual. Our example (look at diffs): https://github.com/Quantum-Game/quantum-game-2/pull/227 https://github.com/Quantum-Game/quantum-game-2/pull/227
- aethr 6y agoI am working on this right now on a medium-sized project, and it's deceptively more work than we anticipated. While Vue's component API itself is remaining mostly backwards compatible with Vue 2, most of the "core" supporting libraries have changed their APIs: Vuex, VueRouter and vue-test-utils in particular. After the package update and some very basic find/replace across our codebase, about half of our 600+ tests had to be significantly updated. If your tests regularly mock a Vuex store or a router, be prepared to be making a lot of updates. If you're using some of the features being removed (filters, $on/$off/$once, etc) or make heavy use of custom plugins, it's not going to be painless. Having said that, I love the direction the new API is heading and 95% of the changes we have to make are for the better in the end, so it feels worth it.
- Already__Taken 6y agoto be fair though you are doing this in hard mode. to transition an app you should wait for 2.7 to get all the warnings and guides. so good job to everyone that you didn't find it herculean.