```coffeescript
@ScrollToOnMountMixin =
  componentDidMount: ->
    $('body').animate scrollTop: @positionInPage() - @marginTop(), 700

  positionInPage: ->
    @jQueryElement().offset().top

  marginTop: ->
    @jQueryElement().css('margin-top').replace('px', '')

  jQueryElement: ->
    $(ReactDOM.findDOMNode(this))
```

Use parseFloat to avoid string subtraction
user
```coffeescript
@ScrollToOnMountMixin =
  componentDidMount: ->
    $('body').animate scrollTop: @positionInPage() - @marginTop(), 700

  positionInPage: ->
    parseFloat @jQueryElement().offset().top

  marginTop: ->
    parseFloat @jQueryElement().css('margin-top').replace('px', '')

  jQueryElement: ->
    $(ReactDOM.findDOMNode(this))
```
assistant