Add some more autobinds

This commit is contained in:
John Lyon-Smith
2018-03-23 07:33:52 -07:00
parent 1b35ac8b22
commit 54365d3566
3 changed files with 6 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ import React from 'react'
import { Route, Redirect } from 'react-router-dom'
import { PropTypes } from 'prop-types'
import { api } from 'src/API'
import autobind from 'autobind-decorator'
export class ProtectedRoute extends React.Component {
static propTypes = {
@@ -15,11 +16,7 @@ export class ProtectedRoute extends React.Component {
roles: ['administrator']
}
constructor(props) {
super(props)
this.updateComponent = this.updateComponent.bind(this)
}
@autobind
updateComponent() {
this.forceUpdate()
}