Skip to content

Commit

Permalink
There is no tslint rule for this. \n
Browse files Browse the repository at this point in the history
One is proposed at palantir/tslint-react#71
  • Loading branch information
AWare committed Sep 7, 2018
1 parent 5a6a2c7 commit 97734cb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/components/Header/Nav/MainMenuToggle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,9 @@ class MainMenuToggle extends Component<Props, { enhanceCheckbox: boolean }> {
componentDidMount is only executed in the browser therefore if
enhanceCheckbox is set to true it indicates that JS is running
in the browser and we should re-render without the NO JS fallback.
Overriding eslint as you can call setState in componentDidMount:
https://reactjs.org/docs/react-component.html#componentdidmount
*/
// eslint-disable-next-line react/no-did-mount-set-state
this.setState({
enhanceCheckbox: true,
});
Expand Down

0 comments on commit 97734cb

Please sign in to comment.