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

Function pushStartButton

packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js:2572–2665  ·  view source on GitHub ↗
(
  target: Array<Chunk | PrecomputedChunk>,
  props: Object,
  resumableState: ResumableState,
  renderState: RenderState,
  formatContext: FormatContext,
)

Source from the content-addressed store, hash-verified

2570}
2571
2572function pushStartButton(
2573 target: Array<Chunk | PrecomputedChunk>,
2574 props: Object,
2575 resumableState: ResumableState,
2576 renderState: RenderState,
2577 formatContext: FormatContext,
2578): ReactNodeList {
2579 target.push(startChunkForTag('button'));
2580
2581 let children = null;
2582 let innerHTML = null;
2583 let name = null;
2584 let formAction = null;
2585 let formEncType = null;
2586 let formMethod = null;
2587 let formTarget = null;
2588
2589 for (const propKey in props) {
2590 if (hasOwnProperty.call(props, propKey)) {
2591 const propValue = props[propKey];
2592 if (propValue == null) {
2593 continue;
2594 }
2595 switch (propKey) {
2596 case 'children':
2597 children = propValue;
2598 break;
2599 case 'dangerouslySetInnerHTML':
2600 innerHTML = propValue;
2601 break;
2602 case 'name':
2603 name = propValue;
2604 break;
2605 case 'formAction':
2606 formAction = propValue;
2607 break;
2608 case 'formEncType':
2609 formEncType = propValue;
2610 break;
2611 case 'formMethod':
2612 formMethod = propValue;
2613 break;
2614 case 'formTarget':
2615 formTarget = propValue;
2616 break;
2617 default:
2618 pushAttribute(target, propKey, propValue);
2619 break;
2620 }
2621 }
2622 }
2623
2624 if (__DEV__) {
2625 if (
2626 formAction !== null &&
2627 props.type != null &&
2628 props.type !== 'submit' &&
2629 !didWarnFormActionType

Callers 1

pushStartInstanceFunction · 0.85

Calls 10

stringToChunkFunction · 0.90
startChunkForTagFunction · 0.85
pushAttributeFunction · 0.85
pushFormActionAttributeFunction · 0.85
pushAdditionalFormFieldsFunction · 0.85
pushInnerHTMLFunction · 0.85
encodeHTMLTextNodeFunction · 0.85
pushMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected