Is there a compiler from js to jsx for React?

扶醉桌前 提交于 2019-12-24 03:19:11

问题


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!


回答1:


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



来源:https://stackoverflow.com/questions/38975847/is-there-a-compiler-from-js-to-jsx-for-react

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!