MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / commitUpdate

Function commitUpdate

source code/ink/reconciler.ts:428–461  ·  view source on GitHub ↗
(
    node: DOMElement,
    _type: ElementNames,
    oldProps: Props,
    newProps: Props,
  )

Source from the content-addressed store, hash-verified

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

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