You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

babel-plugin-jsx-v-model

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
b

babel-plugin-jsx-v-model

JSX v-model transform

2.0.3
latest
100

Supply Chain Security

100

Vulnerability

81

Quality

76

Maintenance

100

License

Version published
Weekly downloads
71K
1.62%
Maintainers
1
Weekly downloads
 
Created
Issues
11

Build Status

JSX v-model for Vue JSX

This babel plugin adds some syntactic sugar to JSX.

Usage:

npm i babel-plugin-jsx-v-model -D

Then add jsx-v-model to your .babelrc file under plugins

example .babelrc:

{
  "presets": ["es2015"],
  "plugins": ["jsx-v-model", "transform-vue-jsx"]
}

code:

Vue.component('hello-world', {
  data: () => ({
    text: 'Hello World!'
  }),
  render () {
    return (
      <div>
        <input type="text" v-model={this.text} />
        {this.text}
      </div>
    )
  }
})

Behaviour is similar to vue template's v-model.

FAQs

Package last updated on 24 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts