Skip to content

remix/component · Function

View Source

defaultResolveFrame

Summary

Fetches frame HTML with default request encoding and response validation.

Rejects non-HTML 3xx/4xx responses and all 5xx responses, including those returned by a custom fetch implementation. The optional commit callback runs when Remix renders the response.

Signature

function defaultResolveFrame(
  src: string,
  options: ResolveFrameOptions,
  overrides: DefaultResolveFrameOverrides,
): Promise<Response>

Parameters

src

Frame source to fetch.

options

Frame target, navigation transition, form submission, and cancellation settings.

overrides

Fetch implementation and callback wrapping the default frame commit.

Returns

The unconsumed response for streaming into the frame. Return it directly to preserve its commit callback; cloning or replacing it does not copy the callback.