var Element = React.createClass({
render: function() {
var o = this.props.obj,
childnodes;
if (o.childs != null) {
childnodes = o.childs.map((node, index) => {
return <Element obj={node} />
})
}
return (
<o.name {...o.attrs}>
{childnodes}
</o.name>
)
}
});
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.