title: Transform ES2019 to React JSX
body: <p>I have been given the task of transforming ES2019 compiled React code back to JSX. The client lost their original files and I put my hand up to complete the task. Unfortunately, there are a few hundred files and as I go one by one transforming them, I thought there must be a way to compile them in one go to JSX.</p>
  <p>For example a snippet of a file needed to transform may be...</p>
  <pre><code>import _extends from &quot;@babel/runtime/helpers/extends&quot;;
  import React from 'react';
  import { Item } from './Item';
  
  const Container = props =&gt; {
    return /*#__PURE__*/React.createElement(&quot;div&quot;, _extends({}, props, {
      component: props.component || Item,
    }));
  };
  
  export default Container;
  </code></pre>
  <p>And I want to transform to...</p>
  <pre><code>import React from 'react';
  import { Item } from './Item';
  
  const Container = (props) =&gt; {
    return &lt;div component={props.component || Item} /&gt;;
  };
  
  export default Container;
  </code></pre>
  <p>I know I can transform JSX to JS but how can I reverse this across hundreds of files?</p>