0.1.4 • Published 9 years ago

react-renderer v0.1.4

Weekly downloads
45
License
-
Repository
-
Last release
9 years ago

React Renderer

Rendering utility to prepend, append react-object to container.

Example
var React = require('react');
var ReactRenderer = require('react-renderer');

var ExampleBox = React.createClass({
  render: function() {
    return (
      <div className="message-box">
      	<div className="message">Pthis.props.message}</div>
      </div>
    )
  }
});

ReactRenderer.render(<ExampleBox message="render!"/>, document.getElementById('react-div'));
ReactRenderer.append(<ExampleBox message="append!"/>, document.getElementById('react-div'));
ReactRenderer.prepend(<ExampleBox message="prepend!"/>, document.getElementById('react-div'));
ReactRenderer.render(<ExampleBox message="render-2!"/>, document.getElementById('react-div'));

or

var React = require('react');
var ReactRenderer = require('react-renderer');
var rendererParams = {
  wrapperClass: 'boxbox'
}
var rr = ReactRenderer.constructor(rendererParams);

var ExampleBox = React.createClass({
  render: function() {
    return (
      <div className="message-box">
      	<div className="message">Pthis.props.message}</div>
      </div>
    )
  }
});

rr.render(<ExampleBox message="render!"/>, document.getElementById('react-div'));
rr.append(<ExampleBox message="append!"/>, document.getElementById('react-div'));
rr.prepend(<ExampleBox message="prepend!"/>, document.getElementById('react-div'));
rr.render(<ExampleBox message="render-2!"/>, document.getElementById('react-div'));
0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago