MCPcopy
hub / github.com/facebook/react / createRequest

Function createRequest

packages/react-server/src/ReactFlightServer.js:777–807  ·  view source on GitHub ↗
(
  model: ReactClientValue,
  bundlerConfig: ClientManifest,
  onError: void | ((error: mixed) => ?string),
  identifierPrefix: void | string,
  onPostpone: void | ((reason: string) => void),
  temporaryReferences: void | TemporaryReferenceSet,
  environmentName: void | string | (() => string), // DEV-only
  filterStackFrame: void | ((url: string, functionName: string) => boolean), // DEV-only
  keepDebugAlive: boolean, // DEV-only
)

Source from the content-addressed store, hash-verified

775}
776
777export function createRequest(
778 model: ReactClientValue,
779 bundlerConfig: ClientManifest,
780 onError: void | ((error: mixed) => ?string),
781 identifierPrefix: void | string,
782 onPostpone: void | ((reason: string) => void),
783 temporaryReferences: void | TemporaryReferenceSet,
784 environmentName: void | string | (() => string), // DEV-only
785 filterStackFrame: void | ((url: string, functionName: string) => boolean), // DEV-only
786 keepDebugAlive: boolean, // DEV-only
787): Request {
788 if (__DEV__) {
789 resetOwnerStackLimit();
790 }
791
792 // $FlowFixMe[invalid-constructor]: the shapes are exact here but Flow doesn't like constructors
793 return new RequestInstance(
794 RENDER,
795 model,
796 bundlerConfig,
797 onError,
798 onPostpone,
799 noop,
800 noop,
801 identifierPrefix,
802 temporaryReferences,
803 environmentName,
804 filterStackFrame,
805 keepDebugAlive,
806 );
807}
808
809export function createPrerenderRequest(
810 model: ReactClientValue,

Callers 15

renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToPipeableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToPipeableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToPipeableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90

Calls 1

resetOwnerStackLimitFunction · 0.90

Tested by

no test coverage detected