MCPcopy Index your code
hub / github.com/codeaashu/claude-code / commitUpdate

Function commitUpdate

src/ink/reconciler.ts:426–459  ·  view source on GitHub ↗
(
    node: DOMElement,
    _type: ElementNames,
    oldProps: Props,
    newProps: Props,
  )

Source from the content-addressed store, hash-verified

424 },
425 // React 19 commitUpdate receives old and new props directly instead of an updatePayload
426 commitUpdate(
427 node: DOMElement,
428 _type: ElementNames,
429 oldProps: Props,
430 newProps: Props,
431 ): void {
432 const props = diff(oldProps, newProps)
433 const style = diff(oldProps['style'] as Styles, newProps['style'] as Styles)
434
435 if (props) {
436 for (const [key, value] of Object.entries(props)) {
437 if (key === 'style') {
438 setStyle(node, value as Styles)
439 continue
440 }
441
442 if (key === 'textStyles') {
443 setTextStyles(node, value as TextStyles)
444 continue
445 }
446
447 if (EVENT_HANDLER_PROPS.has(key)) {
448 setEventHandler(node, key, value)
449 continue
450 }
451
452 setAttribute(node, key, value as DOMNodeAttribute)
453 }
454 }
455
456 if (style && node.yogaNode) {
457 applyStyles(node.yogaNode, style, newProps['style'] as Styles)
458 }
459 },
460 commitTextUpdate(node: TextNode, _oldText: string, newText: string): void {
461 setTextNodeValue(node, newText)
462 },

Callers

nothing calls this directly

Calls 7

setStyleFunction · 0.85
setTextStylesFunction · 0.85
setEventHandlerFunction · 0.85
setAttributeFunction · 0.85
entriesMethod · 0.80
diffFunction · 0.70
hasMethod · 0.45

Tested by

no test coverage detected