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

Function replacer

packages/react-server/src/ReactFlightServer.js:5066–5086  ·  view source on GitHub ↗
(
    this:
      | {+[key: string | number]: ReactClientValue}
      | $ReadOnlyArray<ReactClientValue>,
    parentPropertyName: string,
    value: ReactClientValue,
  )

Source from the content-addressed store, hash-verified

5064 const counter = {objectLimit: objectLimit};
5065
5066 function replacer(
5067 this:
5068 | {+[key: string | number]: ReactClientValue}
5069 | $ReadOnlyArray<ReactClientValue>,
5070 parentPropertyName: string,
5071 value: ReactClientValue,
5072 ): ReactJSONValue {
5073 try {
5074 return renderDebugModel(
5075 request,
5076 counter,
5077 this,
5078 parentPropertyName,
5079 value,
5080 );
5081 } catch (x) {
5082 return (
5083 'Unknown Value: React could not send it from the server.\n' + x.message
5084 );
5085 }
5086 }
5087
5088 const prevNoOutline = debugNoOutline;
5089 debugNoOutline = model;

Callers

nothing calls this directly

Calls 1

renderDebugModelFunction · 0.85

Tested by

no test coverage detected