jsonic-react

0.0.1 • Public • Published

jsonic-react

Deadly simple, react virtual dom generator by pure json format.

What's this?

Just json converter to virtual dom.

I will use this for json patch and base of template engine.

How to use

var React = require('react');
var jsonic = require('jsonic-react');
 
var vdom_format = {
  el: 'ul',
  props: {className: 'container'},
  children: [
    {
      el: 'li',
      props: {key: '1'},
      children: 'fooo'
    },
    {
      el: 'li',
      props: {key: '2'},
      children: 'fooo'
    },
    {
      el: 'li',
      props: {key: '3'},
      children: 'fooo'
    },
    {
      el: 'li',
      props: {key: '4'},
      children: 'fooo'
    }
  ]
}
 
React.createClass({
  render: function(){
    return jsonic(vdom_format);
  }
});

LICENSE

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i jsonic-react

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • mizchi