Skip to content

Commit cf2bd4c

Browse files
committed
Reorganise open/close navMenu functions
1 parent cce9ef7 commit cf2bd4c

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/components/StickyResponsiveSidebar/StickyResponsiveSidebar.js

+4-9
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,15 @@ class StickyResponsiveSidebar extends Component<Props, State> {
3232
this.state = {
3333
open: false,
3434
};
35-
this._openNavMenu = this._openNavMenu.bind(this);
36-
this._closeNavMenu = this._closeNavMenu.bind(this);
3735
}
3836

39-
_openNavMenu: Function;
40-
_closeNavMenu: Function;
41-
42-
_openNavMenu() {
37+
_openNavMenu = () => {
4338
this.setState({open: !this.state.open});
44-
}
39+
};
4540

46-
_closeNavMenu() {
41+
_closeNavMenu = () => {
4742
this.setState({open: false});
48-
}
43+
};
4944

5045
render() {
5146
const {open} = this.state;

0 commit comments

Comments
 (0)