reactel-to-html
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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>'

Readme

Keywords

none

Package Sidebar

Install

npm i reactel-to-html

Weekly Downloads

4

Version

1.1.0

License

ISC

Unpacked Size

4.28 kB

Total Files

7

Last publish

Collaborators

  • sadness.ojisan