# @cjsx React.DOM React = require('react') Card = require('./card') module.exports = React.createClass displayName: 'Cards' getInitialState: ()-> error: false componentDidMount: ()-> console.log 'component did mount' @props.cards.on 'sync', @forceUpdate.bind(@, null) @props.card.on 'sync', @forceUpdate.bind(@, null) @props.card.on 'error', (model, response)=> @setState error: response @forceUpdate.bind(@, null) render: -> console.log 'render cards', @props.cards, @state if @state.error