react-serialize

0.2.1 • Public • Published

React Serialize

serialize and deserialize React components to JSON

serialize(
  <div>
    <h1 align="center">
      <blink>Hello</blink>
    </h1>
  </div>
)
deserialize({
  type: "div",
  props: {
    children: {
      type: "h1",
      props: {
        align: "center",
        children: { type: "blink", props: { children: "Hello" } }
      }
    }
  }
})

Install

npm i react-serialize

API

See src/index.js.

Readme

Keywords

Package Sidebar

Install

npm i react-serialize

Weekly Downloads

4,855

Version

0.2.1

License

MIT

Unpacked Size

6.57 kB

Total Files

4

Last publish

Collaborators

  • pravdomil
  • zasource-dev