Skip to content

Commit 1c52d2f

Browse files
committed
chore: update JSX/TSX doc, close #91
1 parent 01a036f commit 1c52d2f

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

README.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,9 @@ const ComponentB = {
6969
}
7070
```
7171

72-
### TSX
72+
### JSX/TSX
7373

74-
:rocket: An Example [Repository](https://github.com/liximomo/vue-composition-api-tsx-example) with TS and TSX support is provided to help you start.
75-
76-
To support TSX, create a declaration file with following content in your project.
77-
78-
```ts
79-
// file: shim-tsx.d.ts
80-
import Vue, { VNode } from 'vue';
81-
import { ComponentRenderProxy } from '@vue/composition-api';
82-
83-
declare global {
84-
namespace JSX {
85-
// tslint:disable no-empty-interface
86-
interface Element extends VNode {}
87-
// tslint:disable no-empty-interface
88-
interface ElementClass extends ComponentRenderProxy {}
89-
interface ElementAttributesProperty {
90-
$props: any; // specify the property name to use
91-
}
92-
interface IntrinsicElements {
93-
[elem: string]: any;
94-
}
95-
}
96-
}
97-
```
74+
To make JSX/TSX work with `@vue/composition-api`, check out [babel-preset-vca-jsx](https://github.com/luwanquan/babel-preset-vca-jsx) by [@luwanquan](https://github.com/luwanquan).
9875

9976
## Limitations
10077

0 commit comments

Comments
 (0)