c07751fd36
BREAKING CHANGE: `createApp` API has been adjusted. - `createApp()` now accepts the root component, and optionally a props object to pass to the root component. - `app.mount()` now accepts a single argument (the root container) - `app.unmount()` no longer requires arguments. New behavior looks like the following: ``` js const app = createApp(RootComponent) app.mount('#app') app.unmount() ``` |
||
---|---|---|
.. | ||
__tests__ | ||
src | ||
api-extractor.json | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md |
@vue/runtime-test
import { h, render, nodeOps, dumpOps } from '@vue/runtime-test'
const App = {
data () {
return {
msg: 'Hello World!'
}
}
render () {
return h('div', this.msg)
}
}
// root is of type `TestElement` as defined in src/nodeOps.ts
const root = nodeOps.createElement('div')
render(h(App), root)
const ops = dumpOps()
console.log(ops)