React = require 'react' {Actions} = require("inbox-exports") SidebarDividerItem = require("./account-sidebar-divider-item.cjsx") SidebarTagItem = require("./account-sidebar-tag-item.cjsx") SidebarStore = require ("./account-sidebar-store") module.exports = AccountSidebar = React.createClass displayName: 'AccountSidebar' getInitialState: -> @_getStateFromStores() componentDidMount: -> @unsubscribe = SidebarStore.listen @_onStoreChange # It's important that every React class explicitly stops listening to # atom events before it unmounts. Thank you event-kit # This can be fixed via a Reflux mixin componentWillUnmount: -> @unsubscribe() if @unsubscribe render: ->
_sections: -> return @state.sections.map (section) =>