MCPcopy Index your code
hub / github.com/react/react / writeEndSegment

Function writeEndSegment

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js:4800–4833  ·  view source on GitHub ↗
(
  destination: Destination,
  formatContext: FormatContext,
)

Source from the content-addressed store, hash-verified

4798 }
4799}
4800export function writeEndSegment(
4801 destination: Destination,
4802 formatContext: FormatContext,
4803): boolean {
4804 switch (formatContext.insertionMode) {
4805 case ROOT_HTML_MODE:
4806 case HTML_HTML_MODE:
4807 case HTML_HEAD_MODE:
4808 case HTML_MODE: {
4809 return writeChunkAndReturn(destination, endSegmentHTML);
4810 }
4811 case SVG_MODE: {
4812 return writeChunkAndReturn(destination, endSegmentSVG);
4813 }
4814 case MATHML_MODE: {
4815 return writeChunkAndReturn(destination, endSegmentMathML);
4816 }
4817 case HTML_TABLE_MODE: {
4818 return writeChunkAndReturn(destination, endSegmentTable);
4819 }
4820 case HTML_TABLE_BODY_MODE: {
4821 return writeChunkAndReturn(destination, endSegmentTableBody);
4822 }
4823 case HTML_TABLE_ROW_MODE: {
4824 return writeChunkAndReturn(destination, endSegmentTableRow);
4825 }
4826 case HTML_COLGROUP_MODE: {
4827 return writeChunkAndReturn(destination, endSegmentColGroup);
4828 }
4829 default: {
4830 throw new Error('Unknown insertion mode. This is a bug in React.');
4831 }
4832 }
4833}
4834
4835const completeSegmentScript1Full = stringToPrecomputedChunk(
4836 completeSegmentFunction + '$RS("',

Callers 1

flushSegmentContainerFunction · 0.90

Calls 1

writeChunkAndReturnFunction · 0.90

Tested by

no test coverage detected