Using index is bad practice: https://react.dev/learn/rendering-lists#rules-of-keys
We don't recalculate the overflow state once the message is overflown.
When using the index as key, then when a new message is added at the top
of the array at index 0. The overflow state from the previous message at
index 0 is kept. The overflow state shouldn't be reused.