Package Exports
- babel-plugin-jsx-k-model
- babel-plugin-jsx-k-model/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-jsx-k-model) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
JSX k-model for Kdu JSX
This babel plugin adds some syntactic sugar to JSX.
Usage:
npm i babel-plugin-jsx-k-model -D
Then add jsx-k-model
to your .babelrc
file under plugins
example .babelrc:
{
"presets": ["es2015"],
"plugins": ["jsx-k-model", "transform-kdu-jsx"]
}
code:
Kdu.component('hello-world', {
data: () => ({
text: 'Hello World!'
}),
render () {
return (
<div>
<input type="text" k-model={this.text} />
{this.text}
</div>
)
}
})
Behaviour is similar to kdu template's k-model.