DraftChangeSet

Summary

As the user interacts with the draft, changes are accumulated in the DraftChangeSet associated with the store session. The DraftChangeSet does two things:

  1. It debounces changes and calls Actions.saveDraft() at a reasonable interval.
  2. It exposes applyToModel, which allows you to optimistically apply changes to a draft object. When the session vends the draft, it passes it through this function to apply uncommitted changes. This means the Draft provided by the DraftEditingSession will always relfect recent changes, even though they're written to the database intermittently.

results matching ""

    No results matching ""