1.1.0 • Published 4 years ago

reactel-to-html v1.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

reactel-to-html

convert react-el to html.

how to use

$ npm i reactel-to-html
import convert from "reactel-to-html";

const el = `<div className="App">
              <h1>Hello CodeSandbox</h1>
              <h2>Start editing to see some magic happen!</h2>
            </div>`;

const html = convert(el);

// <div class="App" data-reactroot=""><h1>Hello CodeSandbox</h1><h2>Start editing to see some magic happen!</h2></div>

example

Edit inspiring-ride-ob5vn

to develop

# package install
$ npm i

# build
$ npx tsc

# test
$ npx jest

# exec
$ node bin/reactelToHtml.js '<div className="App"><h1>Hello CodeSandbox</h1><h2>Start editing to see some magic happen!</h2></div>'