🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-react-to-vue

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-react-to-vue

my impeccable project

0.0.0
Source
npm
Version published
Weekly downloads
6
-40%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-react-to-vue

NPM version NPM downloads CircleCI donate

🚧 In development...

Install

yarn add babel-plugin-transform-react-to-vue --dev

Usage

{
  "plugins": ["transform-react-to-vue"]
}

Input:

class Counter extends Component {
  state = { count: 0 }

  inc = () => this.setState({count: this.state.count + 1})

  render() {
    return <button onClick={this.inc}>
      {this.state.count}
    </button>
  }
}

Output:

var Counter = {
  data() {
    return {
      count: 0
    }
  },
  methods: {
    inc() {
      this.count = this.count + 1
    }
  },
  render() {
    return <button onClick={this.inc}>
      {this.count}
    </button>
  }
}

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request :D

Author

babel-plugin-transform-react-to-vue © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

FAQs

Package last updated on 23 Jul 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