Skip to content

Commit a83c598

Browse files
committed
Binding that actually works, mea culpa
1 parent b0f79bb commit a83c598

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/MenuBar/MenuBar.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ require('./MenuBar.scss')
55

66
export default class MenuBar extends Component {
77
componentWillMount() {
8+
this.handleResize = this.handleResize.bind(this)
89
this.handleResize()
9-
window.addEventListener('resize', this.handleResize.bind(this))
10+
window.addEventListener('resize', this.handleResize)
1011
}
1112

1213
componentWillUnmount() {
13-
window.removeEventListener('resize', this.handleResize.bind(this))
14+
window.removeEventListener('resize', this.handleResize)
1415
}
1516

1617
handleResize() {

0 commit comments

Comments
 (0)