feat: createApp / appContext

This commit is contained in:
Evan You
2019-09-02 16:09:34 -04:00
parent aac807bc63
commit 32713f8fce
8 changed files with 226 additions and 9 deletions

View File

@@ -1,11 +1,13 @@
import { createRenderer, VNode } from '@vue/runtime-core'
import { createRenderer, VNode, createAppAPI } from '@vue/runtime-core'
import { nodeOps } from './nodeOps'
import { patchProp } from './patchProp'
export const render = createRenderer({
patchProp,
...nodeOps
}) as (vnode: VNode | null, container: HTMLElement) => VNode
}) as (vnode: VNode | null, container: HTMLElement) => void
export const createApp = createAppAPI(render)
// re-export everything from core
// h, Component, reactivity API, nextTick, flags & types