JSFiddle - React, Tailwind, and code Playground
by ifandelse
HTML
<div id="content"></div>
JavaScript
var PlaceKitten = React.createClass({
displayName: 'PlaceKitten',
render: function () {
var url = "http://placekitten.com/" + this.props.width + "/" + this.props.height;
return React.DOM.img({
src: url,
className: this.props.className
});
}
});
var container = document.getElementById("content");
React.renderComponent(PlaceKitten({
width: "300",
height: "500",
className: "kitty-kitty"
}), container);