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

@hexeo/vue-typescript-jsx

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hexeo/vue-typescript-jsx

Translate React JSX props into Vue VDOM data format at runtime

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

vue-typescript-jsx

Usage

tsconfig.json

{
  "compilerOptions": {
    "jsx": "react",
    "jsxFactory": "h",
  }
}
import Vue from 'vue'
import VueTSX from 'vue-typescript-jsx'

Vue.use(VueTSX)

...

Limitations

Spread/Merge props

Spread and merge of props are not supported by typescript compiler.

<div class="a" {...{class: 'b'}} />

This will not result in

{
  class: {
    a: true,
    b: true
  }
}

but in

{
  class: 'b'
}

input, textarea, options, select literal values

Literal values will be passed to domProps-value.

<input value="some value" />

will generate the following in the VDOM Data

{
  domProps: {
    value: 'some value'
  }
}

h auto-injection

There is no h auto-injection, you should provide it.

render(h: Vue.CreateElement) {
  return <div />
}
get value() {
  const h = this.$createElement
  return <div />
}

Keywords

FAQs

Package last updated on 28 Mar 2019

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