© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Mayank Chandola
@fibric gave awesome answer.
As you can see in the diagram Calling setState in componentDidMount will trigger another render() call and it can lead to layout thrashing.
componentDidMount
render()
There's a eslint rule for it.
Read more about Layout Thrashing