<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>
By clicking “Accept cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and assist in our marketing efforts. Check our privacy policies.
By clicking “Accept all”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and assist in our marketing efforts. Check our privacy policies.