@@ -117,14 +117,10 @@ or element in body.
117
117
118
118
###### Note
119
119
120
- * There aren’t many great estree serializers out there that support JSX.
121
- [ recast] [ ] does a great job.
122
- You can also use [ ` estree-to-babel ` ] [ e2b ] to get a Babel AST and then use
123
- [ ` @babel/generator ` ] [ babel-generator ] to serialize JSX
124
- * Similarly, to turn the JSX into function calls, use [ ` estree-to-babel ` ] [ e2b ]
125
- and then [ ` @babel/plugin-transform-react-jsx ` ] [ react-jsx ] (for React)
126
- or for example [ ` @vue/babel-plugin-jsx ` ] [ vue-jsx ] (for Vue), before
127
- serializing the tree
120
+ There aren’t many great estree serializers out there that support JSX.
121
+ [ recast] [ ] does a fine job.
122
+ Or [ ` estree-util-build-jsx ` ] [ build-jsx ] to turn JSX into function
123
+ calls
128
124
129
125
## Security
130
126
@@ -141,6 +137,8 @@ It’s not safe.
141
137
— Create any unist tree
142
138
* [ ` xastscript ` ] ( https://github.com/syntax-tree/xastscript )
143
139
— Create a xast tree
140
+ * [ ` estree-util-build-jsx ` ] [ build-jsx ]
141
+ — Transform JSX to function calls
144
142
145
143
## Contribute
146
144
@@ -208,12 +206,6 @@ abide by its terms.
208
206
209
207
[ recast ] : https://github.com/benjamn/recast
210
208
211
- [ e2b ] : https://github.com/coderaiser/estree-to-babel
212
-
213
- [ babel-generator ] : https://babeljs.io/docs/en/babel-generator
214
-
215
209
[ mdast-util-mdx ] : https://github.com/syntax-tree/mdast-util-mdx
216
210
217
- [ react-jsx ] : https://babeljs.io/docs/en/babel-plugin-transform-react-jsx
218
-
219
- [ vue-jsx ] : https://github.com/vuejs/jsx-next
211
+ [ build-jsx ] : https://github.com/wooorm/estree-util-build-jsx
0 commit comments