   displayName: 'ClearButton'
   getState: -> {isEnabled: @props.lc.canUndo()}
   getInitialState: -> @getState()
-  componentDidMount: ->
-    @subscriber = => @setState @getState()
-    @props.lc.on 'drawingChange', @subscriber
-  componentWillUnmount: ->
-    @props.lc.removeEventListener('drawingChange', @subscriber)
+  mixins: [LC.React.Mixins.UpdateOnDrawingChangeMixin]
 
   render: ->
     {div} = React.DOM

    displayName: 'StrokeWidths'
    getState: -> {strokeWidth: @props.lc.tool?.strokeWidth}
    getInitialState: -> @getState()
    render: ->
      {ul, li, svg, circle} = React.DOM
      strokeWidths = [1, 2, 5, 10, 20, 40]

  displayName: 'RedoButton'
  getState: -> {isEnabled: @props.lc.canRedo()}
  getInitialState: -> @getState()
  mixins: [LC.React.Mixins.UpdateOnDrawingChangeMixin]

  render: ->
    {div} = React.DOM
