What is a common mistake when using componentDidUpdate()?
A common mistake when using componentDidUpdate() is forgetting to include a condition when calling setState(). Without a condition (like comparing current props to previous props), setting state in componentDidUpdate() will trigger another update cycle, leading to an infinite loop and eventually a stack overflow error.