Skip to content

rogeriochaves/react-decompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-decompiler build-status

Decompiles react components back into jsx strings.

Install react-decompiler

npm install react-decompiler

Use it

import {decompile} from 'react-decompiler';

let component = (<div>
    <h1>Hello</h1>
</div>);

decompile(component);

// Outputs: "<div><h1>Hello</h1></div>"

You can also output it nicely formatted

import {formatted} from 'react-decompiler';

let component = (<div>
    <h1>Hello</h1>
</div>);

formatted(component);

// Outputs: "<div>
//  <h1>Hello</h1>
// </div>"

See more examples on the test file

About

Decompile react components back into jsx format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published