Skip to content

adelevie/react-tags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

react-tags

A simple wrapper around React.DOM.

Write a({href: 'http://github.com'}, 'hello') instead of React.DOM.a({href: 'http://github.com'}, 'hello').

Experimental.

Synopsis:

var React = require('React');
var SiteBoilerPlate = require('../core/SiteBoilerPlate.js'); // customize
require('react-tags').pollute(this, React);  // explicitly pollute scope with tags

var content = function() {
  return div({}, 
    p({}, "A paragraph!"),
    ul({}, 
      li({}, "one"),
      li({}, "two"),
      li({}, a({href: "http://github.com"}, "three"))
    ),
    div({}, 
      h3({}, "Hello world"),
      p({}, "some content")
    )
  );
};

var hello = React.createClass({
  render: function() {
    return SiteBoilerPlate({
      children: content()
    });
  }
});

Installation:

npm install react-tags

For a non-React flavor of this library, check out wut.

About

A simple wrapper around React.DOM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published