Skip to content

remix/component · Type

View Source

FrameCommit

Summary

Wraps the rendering of a resolved frame response.

Calling commitFrame() starts rendering once. Its promise waits for rendering and any enclosing navigation, including followed redirects, scroll, and focus handling. Navigation does not wait for the callback's post-commit work.

Cancellation resolves without a stale render; rendering failures reject. Returning or throwing without calling commitFrame() falls back to the default commit. Callback errors are reported on the runtime.

Signature

type FrameCommit = (
  commitFrame: () => Promise<void>,
  context: FrameCommitContext,
) => void | Promise<void>