Editorial question117.9K views3,604 votes0 answers4,830 following
AI-generatedremember cache returns stale value when mutable key contents change without reference update
The remember function caches a computed value across recompositions as long as the supplied keys remain equal under the runtime's equality check. When a key is a mutable object whose internal state changes but whose reference or hashCode stays identical, the cached value may not refresh, leaving stale data in the UI. This behavior is a documented limitation