Comments (6)
I was having problems writing an upgrade in this ngVue package that supported both Vue 2 and 3. I decided to re-write ngVue from with Vue 3 support only in mind, https://github.com/jaredmcateer/ngVue3/tree/main/packages/ngVue3. There are a lot of similarities as the changes between Vue 2 and 3 aren't many but the few that are aren't all trivial and it wasn't that the way ngVue was built was particularly bad in any way.
The big differences are the reactivity helpers like ref
and reactive
instead of Vue.set
and that you can't easily add things to the global Vue object, they need to be added to the app instance, also since composables and plugins have access to lifecycle hooks by importing the functions from vue and we no longer need to add them to the instance so that's been removed. I made a way to pass through plugins and injectables. As such the plugin architecture has been reworked and is hopefully a little more simple and straight forward.
I simplified the API and didn't re-implement the vue-component
directive the createVueComponent
factory is the main way to create the angular directives now (I've also provided a helper function to reduce the boilerplate that pattern needs). I also didn't re-implement quirksMode (I think reactive
mostly eliminates that issue).
There are no longer import/requires with side effects, everything needs to be explicitly imported (primarily useNgVue
/useNgVuePlugins
initialize the angular ngVue
and ngVue.plugins
modules and return the namespace, and ngVueComponent
which is the helper to be used with the directive factory)
Filters a not a built-in plugin, they no longer work the same way in Vue 3, you can't use them as a pipe in the templates anymore (e.g., {{ 'fop' | upper }}
) and it's just recommended to import them as use them like a method or computed getter. I still may come up with a way to easily inject internal angular filters but not completely decided on that.
I also rewrote the entire thing in typescript so you'll have types support in your app if you desire and should hopefully help with understanding how the codes works for the next person that comes along needing to maintain this package (though now that I understand ngVue better I will do my best to help out when I can)
Also want to thank @kas84 for their initial work, it helped kick start my learning of the code base and inspired some of the changes I made.
from ngvue.
Hi,
Just in case anyone need this. I only support prop syncing and it's kind of hackish but I have working example for vue3.
https://github.com/kas84/ngVue
from ngvue.
I have no good thoughts on what's involved.
The core contributors appear to have moved on and the project is receiving no active development from anyone. I contacted the owner to get member status so I could publish a fix to a memory leak. While I'm willing incorporate contributions from others my knowledge of the codebase is far from comprehensive, sorry.
from ngvue.
did you get any time :)
from ngvue.
Unfortunately I don't have a lot of spare time these days. Our project won't be upgrading to vue3 in the near future so I won't be able to justify working on it with my employer.
As always I am open to PRs
from ngvue.
@jaredmcateer Do you (or any of the other main project contributors) have an idea of the likely tasks involved in moving this library to Vue3? We want to use the library in our project and we will be considering moving to Vue3 at some stage in the future so we may, as a team, have time to help.
from ngvue.
Related Issues (20)
- Support for composition api? HOT 2
- .sync modifier HOT 2
- Support multiple children in <slot>
- How to listen to broadcasted event from angular components into Vue component? HOT 4
- Vue component not rendering on IE HOT 1
- Vue-apollo provider doesn't work
- How to use Vue.js provide/inject with ngVue?
- Quirk Mode doesn't work.
- Specify `module` to `build/index.esm.js` in `package.json` to support ESM import HOT 2
- Incorrect main/module/exports in `package.json` in v2.1.1 HOT 2
- Mount Vue in ShadowDOM HOT 1
- Plugins do not work with Webpack 5 HOT 4
- Time to remove that deprecation message? HOT 4
- Update to the Vuex store does not trigger update in the components in debug mode. HOT 2
- `this.$store` is undefined after migration to wepback5 HOT 8
- how to re render a vue component with ngVue HOT 3
- Error: ngVue components must have a parent tag or they will not render HOT 1
- Maintainers needed
- v-directive not updating value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngvue.