Reference

@reckona/mreact-compat/flight

47 public exports.

Function

FunctioncreateFetchServerReferenceCallerfunction createFetchServerReferenceCaller(endpoint: string, options: FetchServerReferenceCallerOptions): (reference: FlightServerReference, args: unknown[]): unknownCreates a server reference caller that POSTs encoded action invocations to an endpoint.FunctiondecodeFlightResponsefunction decodeFlightResponse(response: FlightResponse, options: DecodeFlightOptions): unknownDecodes the root model from a parsed Flight response.FunctiongetReactFlightProtocolCoveragefunction getReactFlightProtocolCoverage(): ReactFlightProtocolCoverageReturns the React Flight protocol markers currently covered by the decoder.FunctionhydrateFlightResponsefunction hydrateFlightResponse(container: Element, response: FlightResponse, options: HydrateFlightOptions): RootDecodes a Flight response and hydrates the resulting tree into a container.FunctionparseFlightResponsefunction parseFlightResponse(payload: string | ArrayBuffer | Uint8Array<ArrayBufferLike>): FlightResponseParses a serialized Flight payload into a Flight response object.FunctionreadFlightResponsefunction readFlightResponse(root: ParentNode | Document, id?: string): FlightResponseReads and parses a Flight response script from a document or parent node.

Interface

InterfaceDecodeFlightOptionsinterface DecodeFlightOptionsOptions used when resolving client and server references while decoding Flight models.InterfaceFetchServerReferenceCallerOptionsinterface FetchServerReferenceCallerOptionsOptions for creating a fetch-based server reference caller.InterfaceFlightArrayBufferModelinterface FlightArrayBufferModelFlight model record for an ArrayBuffer value.InterfaceFlightBigIntModelinterface FlightBigIntModelFlight model record for a bigint value.InterfaceFlightClientReferenceinterface FlightClientReferenceClient module reference carried by a Flight response.InterfaceFlightClientReferenceModelinterface FlightClientReferenceModelFlight model record that points at a client reference table entry.InterfaceFlightDataViewModelinterface FlightDataViewModelFlight model record for a DataView value.InterfaceFlightDateModelinterface FlightDateModelFlight model record for a Date value.InterfaceFlightElementModelinterface FlightElementModelFlight model record for a rendered element.InterfaceFlightErrorModelinterface FlightErrorModelFlight model record for an error thrown while decoding.InterfaceFlightFormDataModelinterface FlightFormDataModelFlight model record for a FormData value.InterfaceFlightIterableModelinterface FlightIterableModelFlight model record for an iterable value encoded as an array.InterfaceFlightMapModelinterface FlightMapModelFlight model record for a Map value.InterfaceFlightNumberModelinterface FlightNumberModelFlight model record for non-finite or negative-zero numbers.InterfaceFlightObjectModelinterface FlightObjectModelInterfaceFlightObjectReferenceModelinterface FlightObjectReferenceModelFlight model record that points at a shared object table entry.InterfaceFlightPromiseModelinterface FlightPromiseModelFlight model record for a pending promise chunk.InterfaceFlightRegExpModelinterface FlightRegExpModelFlight model record for a RegExp value.InterfaceFlightResponseinterface FlightResponseParsed React Flight response with root model and reference tables.InterfaceFlightServerReferenceinterface FlightServerReferenceServer action reference carried by a Flight response.InterfaceFlightServerReferenceModelinterface FlightServerReferenceModelFlight model record that points at a server reference table entry.InterfaceFlightSetModelinterface FlightSetModelFlight model record for a Set value.InterfaceFlightSymbolModelinterface FlightSymbolModelFlight model record for a global symbol.InterfaceFlightTypedArrayModelinterface FlightTypedArrayModelFlight model record for a typed array value.InterfaceFlightUrlModelinterface FlightUrlModelFlight model record for a URL value.InterfaceHydrateFlightOptionsinterface HydrateFlightOptionsOptions for decoding a Flight response and hydrating it into a DOM container.InterfaceReactFlightProtocolCoverageinterface ReactFlightProtocolCoverageLists the React Flight row tags and model tokens recognized by this package.

Re-export

Re-exportElementTypeconst ElementType: unknownRe-exportForwardRefTypeconst ForwardRefType: unknownRe-exportHydrateRootOptionsconst HydrateRootOptions: unknownRe-exportHydrationRecoverableErrorInfoconst HydrationRecoverableErrorInfo: unknownRe-exportLazyTypeconst LazyType: unknownRe-exportMemoTypeconst MemoType: unknownRe-exportReactCompatContextProviderShorthandconst ReactCompatContextProviderShorthand: unknownRe-exportReactCompatNodeconst ReactCompatNode: unknownRe-exportReactCompatPortalconst ReactCompatPortal: unknownRe-exportReactCompatProviderTypeconst ReactCompatProviderType: unknownRe-exportReactCompatRenderableElementconst ReactCompatRenderableElement: unknownRe-exportRootconst Root: unknown

Type Alias

Type AliasFlightModeltype FlightModel = null | string | number | boolean | FlightModel[] | FlightObjectModel | FlightElementModel | FlightClientReferenceModel | FlightServerReferenceModel | FlightObjectReferenceModel | FlightDateModel | FlightBigIntModel | FlightNumberModel | FlightSymbolModel | FlightMapModel | FlightSetModel | FlightFormDataModel | FlightIterableModel | FlightErrorModel | FlightPromiseModel | FlightArrayBufferModel | FlightTypedArrayModel | FlightDataViewModel | FlightRegExpModel | FlightUrlModel | { kind: "undefined" }Serializable model value supported by the mreact Flight decoder.Type AliasFlightTypedArrayNametype FlightTypedArrayName = "Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt64Array" | "BigUint64Array"Typed array constructor names supported by the Flight decoder.