Fix React List Key Duplication Causing DOM Errors
Encountered this issue while building an AI Agent chat interface. Here's the root cause and solution.
TL;DR
Date.now() millisecond timestamps can duplicate within the same millisecond. When used as React list keys, this causes DOM errors. Fix by adding a random suffix or using crypto.randomUUID().