https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md Official docs say doing this is OK for our version (16.2) - https://5abc31d8be40f1556f06c4be--reactjs.netlify.com/docs/react-component.html#componentdidmount It's sometimes a useful pattern when dealing with the initial state of an item that needs to know about viewport height and width.