I have following code:
export class Highlights extends React.Component {
render() {
return (
{JSON.string
var Highlight = React.createClass({
render: function() {
const {value, label} = this.props;
return {label}: {value};
}
});
var Highlights = React.createClass({
render: function() {
const {active, automatic, waiting, manual} = this.props.highlights_data.data;
return (
);
}
});
const data = {data:{"active":{"label":"Active","value":"12"},"automatic":{"label":"Automatic","value":"8"},"waiting":{"label":"Waiting","value":"1"},"manual":{"label":"Manual","value":"3"}}};
ReactDOM.render(
,
document.getElementById('container')
);