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

@vue/babel-preset-jsx

Package Overview
Dependencies
Maintainers
10
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/babel-preset-jsx

Babel preset for Vue JSX

  • 1.0.0-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
489K
decreased by-36.68%
Maintainers
10
Weekly downloads
 
Created

What is @vue/babel-preset-jsx?

@vue/babel-preset-jsx is a Babel preset that allows you to use JSX syntax in Vue.js applications. It provides a way to write Vue components using JSX, which can be more familiar to developers coming from a React background. This preset simplifies the process of integrating JSX into Vue projects and ensures compatibility with Vue's reactivity system.

What are @vue/babel-preset-jsx's main functionalities?

JSX Syntax in Vue Components

This feature allows you to write Vue components using JSX syntax. The code sample demonstrates a simple Vue component that renders a div with the text 'Hello, JSX!'.

export default { render() { return <div>Hello, JSX!</div> } }

Using Props in JSX

This feature shows how to use props in a Vue component written with JSX. The code sample demonstrates a component that takes a 'message' prop and renders it inside a div.

export default { props: ['message'], render() { return <div>{this.message}</div> } }

Event Handling in JSX

This feature demonstrates how to handle events in a Vue component using JSX. The code sample shows a button that displays an alert when clicked.

export default { render() { return <button onClick={() => alert('Clicked!')}>Click Me</button> } }

Other packages similar to @vue/babel-preset-jsx

FAQs

Package last updated on 25 Dec 2018

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