   cell =
     component_model: new Bacon.Model null
     type: 'output'
+    key: "output#{cell_key++}"
     visible: true
     active: true
     notebook: notebook
     number: number
 
-  cell.component = OutputCellComponent {cell}
+  cell.component = OutputCellComponent
   cell
 
 run = (input_cell) ->

    editor_changes: Editor.as_event_stream editor, 'change'

  editor.lead_cell = cell
  component = InputCellComponent {cell}
  cell.component = component

  # scan changes for the side effect in recompile
  # we have to subscribe so that the events are sent


InputOutputComponent = React.createClass
  displayName: 'InputOutputComponent'
  mixins: [React.addons.PureRenderMixin]
  render: ->
    React.DOM.div {className: 'io'},
      @props.input_cell?.component cell: @props.input_cell, key: @props.input_cell.key
      @props.output_cell?.component cell: @props.output_cell, key: @props.output_cell.key

DocumentComponent = React.createClass
  displayName: 'DocumentComponent'
