Interview frequency: …
Short answer
Memory state disappears when the process ends, while restoration or persistence needs a clear contract for what is saved, when it is restored, and where.
Explanation
Do not save every object automatically; choose small serializable values such as navigation or a form draft, and define the behavior for stale data and upgrades. Use restoration to return after the system terminates an app that was in the background when the flow supports it, and permanent storage for data that must live longer.
Common mistakes
- Treating state restoration as a substitute for a database.
- Saving secrets or tokens in a restoration bundle without protection.