Skip to content

Commit

Permalink
fix: Use property initializer syntax to capture proper 'this' context
Browse files Browse the repository at this point in the history
* Use property initializer syntax to capture proper 'this' context

* Add .gitignore

* Remove debugger

* Remove logs from gitignore

* Remove gitignore completely
  • Loading branch information
ghost1face authored and tmcw committed Sep 23, 2017
1 parent 7a7a39d commit 45ac20a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class App extends React.PureComponent {
};
}
}
toggleNav() {
toggleNav = () => {
this.setState({ showNav: !this.state.showNav });
}
componentDidMount() {
Expand All @@ -115,7 +115,7 @@ export default class App extends React.PureComponent {
}
}
}
mediaQueryChanged() {
mediaQueryChanged = () => {
this.setState({
queryMatches: this.state.mqls.reduce((memo, q) => {
memo[q.name] = q.query.matches;
Expand Down Expand Up @@ -153,7 +153,7 @@ export default class App extends React.PureComponent {
this.toggleNav();
}
}
toggleColumnMode() {
toggleColumnMode = () => {
this.setState({
columnMode: this.state.columnMode === 1 ? 2 : 1
});
Expand Down

0 comments on commit 45ac20a

Please sign in to comment.