Skip to content

mizchi/jsonic-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonic-react

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

npm install jsonic-react --save

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published