vue3-yuanma/packages/runtime-core/README.md

27 lines
708 B
Markdown
Raw Normal View History

2018-10-27 03:44:50 +08:00
# @vue/runtime-core
2018-09-19 23:35:38 +08:00
> This package is published only for typing and building custom renderers. It is NOT meant to be used in applications.
2018-09-20 12:17:20 +08:00
2019-09-07 00:58:31 +08:00
For full exposed APIs, see `src/index.ts`. You can also run `yarn build runtime-core --types` from repo root, which will generate an API report at `temp/runtime-core.api.md`.
## Building a Custom Renderer
2018-09-20 12:17:20 +08:00
``` ts
2019-09-07 00:58:31 +08:00
import { createRenderer, createAppAPI } from '@vue/runtime-core'
2018-09-20 12:17:20 +08:00
2019-09-07 00:58:31 +08:00
// low-level render method
export const render = createRenderer({
pathcProp,
insert,
remove,
createElement,
// ...
2018-09-20 12:17:20 +08:00
})
2019-09-07 00:58:31 +08:00
export const createApp = createAppAPI(render)
export * from '@vue/runtime-core'
2018-09-20 12:17:20 +08:00
```
2019-09-07 00:58:31 +08:00
See `@vue/runtime-dom` for how a DOM-targeting renderer is implemented.