Is there a compiler from js to jsx for React?

2019-07-14 08:52发布

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条回答
We Are One
2楼-- · 2019-07-14 09:42

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

查看更多
登录 后发表回答