[eslint config] [patch] disable no-did-mount-set-state, since it’s necessary for server-rendering.

Fixes #684.
This commit is contained in:
Jordan Harband
2017-11-04 01:02:09 -07:00
parent 5682155e9a
commit 44dbd0bdc4

View File

@@ -142,7 +142,8 @@ module.exports = {
// Prevent usage of setState in componentDidMount
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
'react/no-did-mount-set-state': 'error',
// this is necessary for server-rendering
'react/no-did-mount-set-state': 'off',
// Prevent usage of setState in componentDidUpdate
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md