We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0f79bb commit a83c598Copy full SHA for a83c598
components/MenuBar/MenuBar.jsx
@@ -5,12 +5,13 @@ require('./MenuBar.scss')
5
6
export default class MenuBar extends Component {
7
componentWillMount() {
8
+ this.handleResize = this.handleResize.bind(this)
9
this.handleResize()
- window.addEventListener('resize', this.handleResize.bind(this))
10
+ window.addEventListener('resize', this.handleResize)
11
}
12
13
componentWillUnmount() {
- window.removeEventListener('resize', this.handleResize.bind(this))
14
+ window.removeEventListener('resize', this.handleResize)
15
16
17
handleResize() {
0 commit comments