       model.save {},
         success: =>
           @setState phase: 'new'
-          @setState text: ''
+          @refs.text_area.updateText ''
         error: =>
           @props.addToCollection.remove(model)
           @setState phase: 'new'

ReactSubCommentsAdd = React.createClass
  getInitialState: ->
    text: ''
    phase: 'new'

  updateText: (e)->
    @setState text: e.target.value

  submit: ->
    return if @state.phase == 'submitting'
    @setState phase: 'submitting'

    model = new SubComment
      content: $.trim(@state.text)
      created_by: currentUser.toJSON()

    if model.isValid()

          'Posting...'

    R.div className: 'sub-comment-add spec-sub-comments-form',
      ReactTextArea
        placeholder: 'Leave a reply'
        onChange: @updateText
        defaultValue: ''
        ref: 'text_area'
        onSubmit: @submit
      submit_button


