Skip to content

Instantly share code, notes, and snippets.

@hitautodestruct
Last active April 10, 2019 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitautodestruct/64ea5587a95f071746cfa66cba36f969 to your computer and use it in GitHub Desktop.
Save hitautodestruct/64ea5587a95f071746cfa66cba36f969 to your computer and use it in GitHub Desktop.
Trying to cheat vue 2 into allowing multiple root components
<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