Using PVue with CustomElements (with examples) #130
alshdavid
started this conversation in
Show and tell
Replies: 1 comment
-
How difficult it is to do the same thing without PVue? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
You can use pvue with custom elements!
Simple Example
Simple Wrapper
Personally though, I like to wrap this functionality so it's easier to write. Here I create a
defineComponent
function that will register a component.And the implementation of
defineComponent
. It's not perfect. As you can imagine there are lots of things I would add to production code - like context, outputs and value props, but it's a simple demonstration.For production I would also implement this as a decorator for TypeScript
Beta Was this translation helpful? Give feedback.
All reactions