<p>Although calling setState on componentDidMount is frowned upon - there is even a eslint rule for that -, sometimes it is necessary. When working with DOM elements, you probably will need that additional render to achieve what you want #componentdidmount</p>