-
Notifications
You must be signed in to change notification settings - Fork 139
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
Vue renderer #1220
Comments
A renderer built with the 5.x renderer API would look something like: https://gist.github.com/treshugart/b27bf304a5cba2f79b5eafa5436c414e. It's not using any build system stuff, but not sure how that would look. |
Ah cool, good for me to study, thanks!
It does! You cans define a render method and return something very similar to React, using Vue's createElement. This is what Vue templates use in their compiled form: https://vuejs.org/v2/guide/render-function.html |
Yeah I saw that. I created #1221 so that we can pass through the |
I believe it may be so that Vue can control the version of createElement at runtime, to avoid version mismatch problems like with React (importing createElement from one version of React then using it in a component which is in turn used in a component made with another version of React causes everything to break with strange errors in console) |
which is in turn* |
True. Also means you can compile JSX to a single pragma in a single file and use several different vdom functions quite easily. |
I wonder what a
rendererCallback
for using Vue inside SkateJS might look like. In particular, I'm wondering if there's some way of using Vue build-system type stuff (f.e. stuff like vue-loader for Webpack) so that we can write SkateJS components while taking advantage of that cool Vue build stuff.Maybe it'd be a matter of simply compiling one Vue component per SkateJS component, then in the SkateJS component just refer to the compiled Vue component by name.
I'm curious to find a good way to create Custom Elements (because their API contract allows them to be used in any other framework) while still benefitting from the patterns from something like Vue.
I'll post back when/if I get to try it out.
The text was updated successfully, but these errors were encountered: