Socket
Socket
Sign inDemoInstall

react-domify

Package Overview
Dependencies
20
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-domify

React Domify


Version published
Maintainers
1
Install size
20.7 kB
Created

Readme

Source

React DOMify

Like JSON.strinfigy but uses React.js to generate DOM elements.

Demo & Examples

Live demo: JedWatson.github.io/react-domify

To build the examples locally, run:

npm install
gulp dev

Then open localhost:8000 in a browser.

Installation

The easiest way to use react-domify is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).

You can also use the standalone build by including dist/react-domify.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.

npm install react-domify --save

Usage

Provide the variable to render as the value property.

var DOMify = require('react-domify');

var data = {
  str: 'It formats strings, numbers, booleans and dates',
  bool: true,
  date: new Date(),
  num: 42,
  arr: [
    'And nested arrays / objects',
    {
      key: 'value'
    }
  ]
};

<DOMify value={data} />

License

MIT. Copyright (c) 2016 Jed Watson.

Keywords

FAQs

Last updated on 17 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc