(node: DOMElement, _type: ElementNames, oldProps: Props, newProps: Props)
| 295 | }, |
| 296 | // React 19 commitUpdate receives old and new props directly instead of an updatePayload |
| 297 | commitUpdate(node: DOMElement, _type: ElementNames, oldProps: Props, newProps: Props): void { |
| 298 | const props = diff(oldProps, newProps) |
| 299 | const style = diff(oldProps['style'] as Styles, newProps['style'] as Styles) |
| 300 | |
| 301 | if (props) { |
| 302 | for (const [key, value] of Object.entries(props)) { |
| 303 | if (key === 'style') { |
| 304 | setStyle(node, value as Styles) |
| 305 | |
| 306 | continue |
| 307 | } |
| 308 | |
| 309 | if (key === 'textStyles') { |
| 310 | setTextStyles(node, value as TextStyles) |
| 311 | |
| 312 | continue |
| 313 | } |
| 314 | |
| 315 | if (EVENT_HANDLER_PROPS.has(key)) { |
| 316 | setEventHandler(node, key, value) |
| 317 | |
| 318 | continue |
| 319 | } |
| 320 | |
| 321 | setAttribute(node, key, value as DOMNodeAttribute) |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | if (style && node.yogaNode) { |
| 326 | applyStyles(node.yogaNode, style, newProps['style'] as Styles) |
| 327 | } |
| 328 | }, |
| 329 | commitTextUpdate(node: TextNode, _oldText: string, newText: string): void { |
| 330 | setTextNodeValue(node, newText) |
| 331 | }, |
nothing calls this directly
no test coverage detected