JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 693
  • Score
    100M100P100Q94605F

Package Exports

  • react-serialize

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-serialize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

Example

See CodeSandbox.

API

See src/index.js.

By buying a beer.