fix: Use property initializer syntax to capture proper 'this' context
* Use property initializer syntax to capture proper 'this' context * Add .gitignore * Remove debugger * Remove logs from gitignore * Remove gitignore completely
This commit is contained in:
committed by
Tom MacWright
parent
7a7a39df39
commit
45ac20aaa5
@ -93,7 +93,7 @@ export default class App extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toggleNav() {
|
toggleNav = () => {
|
||||||
this.setState({ showNav: !this.state.showNav });
|
this.setState({ showNav: !this.state.showNav });
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -115,7 +115,7 @@ export default class App extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mediaQueryChanged() {
|
mediaQueryChanged = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
queryMatches: this.state.mqls.reduce((memo, q) => {
|
queryMatches: this.state.mqls.reduce((memo, q) => {
|
||||||
memo[q.name] = q.query.matches;
|
memo[q.name] = q.query.matches;
|
||||||
@ -153,7 +153,7 @@ export default class App extends React.PureComponent {
|
|||||||
this.toggleNav();
|
this.toggleNav();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toggleColumnMode() {
|
toggleColumnMode = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
columnMode: this.state.columnMode === 1 ? 2 : 1
|
columnMode: this.state.columnMode === 1 ? 2 : 1
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user