@allex/vue-renderer
v1.0.0
Published
Abstract Vue components for purge functional render
Downloads
5
Readme
@allex/vue-renderer
Abstract Vue components for purge functional render
Installation
yarn add @allex/vue-renderer -D
Example
test.jsx
import { Renderer } from '@allex/vue-renderer'
// A helper functional jsx module
const renderName = (h: CreatElement, name: string): VNode => (
<span>Hi, {name}</span>
)
@Component({
components: { Renderer }
})
export default class TestVi extends Vue {
userName: string = 'Allex';
render (h) {
return <Renderer data={this.userName} render={renderName} />
}
}
License
MIT Copyright (c) Allex Wang