Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-jsx-vue-functional

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-jsx-vue-functional

JSX Syntactic Sugar Plugin for Vue Functional Components

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by137.17%
Maintainers
1
Weekly downloads
 
Created
Source

JSX Functional Components for Vue JSX

This babel plugin adds some syntactic sugar to JSX.

Usage:

npm i babel-plugin-jsx-vue-functional -D

or

yarn add babel-plugin-jsx-vue-functional -D

Then add jsx-vue-functional to your .babelrc file under plugins

example .babelrc:

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

Example:

export const a = ({ props, listeners }) => <div onClick={listeners.click}>{props.msg}</div>

will be transpiled into:

export const a = {
  functional: true,
  render: (h, { props, listeners }) => <div onClick={listeners.click}>{props.msg}</div>
};
Warning

This plugin will transform all named exported arrow functions that contain JSX.

FAQs

Package last updated on 02 May 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc