是否有用于React的从js到jsx的编译器? [英] Is there a compiler from js to jsx for React?
问题描述
是否有人知道将React/JS转换为React/JSX的编译器. 在工作中,我有一个任务来维护以老式javascript样式编写的react应用.最近,我开始学习和使用EcmaScript6,但是在工作中,这个旧的JS非常混乱.我该怎么办才能轻松理解以这种丑陋风格编写的该项目和代码库中发生了什么?
Does someone know a compiler to convert React/JS to React/JSX. At work I am given a task to maintain a react app that is writen in the old fashioned javascript style. Recently I began leaning and using EcmaScript6 but at work this old JS is very messy. What can I do to easily understand what's going on with this project and code base written in this ugly style?
我们非常感谢您的帮助!
Any help is highly appreciated!
推荐答案
一些谷歌搜索使我想到了 https://github.com/JoeStanton/babel-transform-js-to-jsx .还没有亲自尝试过,但是如果它按照它说的去做,那应该就是您要寻找的
Some googling led me to this https://github.com/JoeStanton/babel-transform-js-to-jsx. Haven't tried it out personally, but if it does what it says it does, it should be what you're looking for
这篇关于是否有用于React的从js到jsx的编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!