# @cjsx React.DOM React = require('react') Card = require('./card') module.exports = React.createClass displayName: 'Cards' componentDidMount: ()-> console.log 'component did mount' @props.cards.on 'sync', @forceUpdate.bind(@, null) render: -> console.log 'render cards', @props.cards if !@props.cards.fetching console.log 'cards loaded' cards = @props.cards.map (card)->
{cards}
else if @props.cards.error
{ for i in [1..9]
{@props.cards.error}
}
else console.log 'cards loading'
{ for i in [1..9]
Loading ...
}