Define what may persist

Start with scope, schema version, expiry, and approved non-sensitive fields. Exclude passwords, access tokens, sensitive identifiers, and any value without an explicit persistence decision. Scope is not an authorization check.

React's effects guidance distinguishes synchronization with an external system from rendering. It does not prescribe browser-storage policy or this draft model.

Restore only a current record

Discard records with a different scope or schema version. Expire old records instead of guessing whether they still describe the form. Clear the local draft only after the trusted service reports the accepted submission outcome.

npm test --prefix sites/reactjsx.com/evidence/P122

The model tests restoration, mismatch, expiry, and clearing; it does not render React, write browser storage, or authorize a request.

  • Persisted fields are approved as non-sensitive.
  • Scope, schema version, and expiry have a documented meaning.
  • The backend rechecks authorization and validation.

For live updates while editing, see Preserve a React Draft During a Background Refresh.