| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @flow strict |
| 8 | */ |
| 9 | |
| 10 | import type {AttributeConfiguration} from '../../../../ReactNativeTypes'; |
| 11 | |
| 12 | import deepDiffer from './deepDiffer'; |
| 13 | |
| 14 | export default function diff( |
| 15 | prevProps: Object, |
| 16 | nextProps: Object, |
| 17 | validAttributes: AttributeConfiguration, |
| 18 | ): null | Object { |
| 19 | const {children: _prevChildren, ...prevPropsPassed} = prevProps; |
| 20 | const {children: _nextChildren, ...nextPropsToPass} = nextProps; |
| 21 | return deepDiffer(prevPropsPassed, nextPropsToPass) ? nextPropsToPass : null; |
| 22 | } |