Last active
April 10, 2019 12:03
-
-
Save hitautodestruct/64ea5587a95f071746cfa66cba36f969 to your computer and use it in GitHub Desktop.
Trying to cheat vue 2 into allowing multiple root components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
export default { | |
name: 'MultiRoot', | |
functional: true, | |
render(h, { children }) { | |
return children.map(vnode => <components is={vnode.context.$options.name} />) | |
}, | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment