Decompiles react components back into jsx strings.
Install react-decompiler
npm install react-decompiler
Use it
; let component = <div> <h1>Hello</h1></div>; ; // Outputs: "<div><h1>Hello</h1></div>"
You can also output it nicely formatted
; let component = <div> <h1>Hello</h1></div>; ; // Outputs: "<div>// <h1>Hello</h1>// </div>"
See more examples on the test file