var React = require('react'), SectionCollection = require('../models/sectionCollection'), Section = require('../models/section'); var SectionItem = React.createClass({ subCatClicked: function() { alert('you clicked on subcategory'); }, render: function() { var catStyle = { paddingLeft: '20px' }; var subStyle = { paddingLeft: '20px' }; var style = { paddingLeft: '30px' }; var self = this; return (
  • {this.props.data.get('name')}
    { this.props.data.get('categories').map(function(cat) { return (
    {cat.name} { cat.sub_categories.map(function(sc) { return
    {sc.name}
    }) }
    ) }) }
  • ); } }); var SectionsListComponent = React.createClass({ render: function() { return (
    ); } }); module.exports = SectionsListComponent;