/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate/diffAttributePayloads.js
22 строки
676 B
Pieter De Baets
[react-native] Consume ReactNativeAttributePayloadFabric from ReactNativePrivateInterface (#33616)
25 июн 2025, 12:23
Не верифицирован
25 июн 2025, 12:23
7a3ffef
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict */ import type {AttributeConfiguration} from '../../../../ReactNativeTypes'; import deepDiffer from './deepDiffer'; export default function diff( prevProps: Object, nextProps: Object, validAttributes: AttributeConfiguration, ): null | Object { const {children: _prevChildren, ...prevPropsPassed} = prevProps; const {children: _nextChildren, ...nextPropsToPass} = nextProps; return deepDiffer(prevPropsPassed, nextPropsToPass) ? nextPropsToPass : null; }