( instance: Instance, type: string, oldProps: Props, newProps: Props, internalInstanceHandle: Object, )
| 443 | } |
| 444 | |
| 445 | export function commitUpdate( |
| 446 | instance: Instance, |
| 447 | type: string, |
| 448 | oldProps: Props, |
| 449 | newProps: Props, |
| 450 | internalInstanceHandle: Object, |
| 451 | ): void { |
| 452 | const viewConfig = instance.viewConfig; |
| 453 | |
| 454 | updateFiberProps(instance._nativeTag, newProps); |
| 455 | |
| 456 | const updatePayload = diff(oldProps, newProps, viewConfig.validAttributes); |
| 457 | |
| 458 | // Avoid the overhead of bridge calls if there's no update. |
| 459 | // This is an expensive no-op for Android, and causes an unnecessary |
| 460 | // view invalidation for certain components (eg RCTTextInput) on iOS. |
| 461 | if (updatePayload != null) { |
| 462 | UIManager.updateView( |
| 463 | instance._nativeTag, // reactTag |
| 464 | viewConfig.uiViewClassName, // viewName |
| 465 | updatePayload, // props |
| 466 | ); |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | export function insertBefore( |
| 471 | parentInstance: Instance, |
nothing calls this directly
no test coverage detected