2 ms·
Last time I tried it did not support cjsx -> jsx, as far as I can tell, so it's useless for migrating React code bases.
by scotty79 9y ago
Last time I tried it did not support cjsx -> jsx, as far as I can tell, so it's useless for migrating React code bases.
- alangpierce 9y agoTake a look at depercolator, it's a wrapper around cjsx-transform, decaffeinate, and some other things: https://github.com/bugsnag/depercolator https://github.com/bugsnag/depercolator There's an open decaffeinate bug for CJSX ( https://github.com/decaffeinate/decaffeinate/issues/1009 https://github.com/decaffeinate/decaffeinate/issues/1009 ) but I suspect it'll be really hard to do anything better than just running cjsx-transform and then running regular decaffeinate. To get JSX on the JS side after decaffeinate, you can use the create-element-to-jsx script from https://github.com/reactjs/react-codemod https://github.com/reactjs/react-codemod .