mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45859 "Fabric without SVCs" configuration is nearly gone, and so it doesn't make sense to need to add no-op methods, on normally Paper only code, etc to satisfy native viewconfig. These particular warnings are then more often noise, than things we need to action on. Checking for native code to be present can also break development where users are using distributed native app, slightly older than JS. This keeps the warning, only if static viewconfigs are missing native view config attributes (i.e. new prop would only be exposed to Paper, instead of only exposed to Fabric) Changelog: [Internal] Reviewed By: javache Differential Revision: D60575253 fbshipit-source-id: 1c118274b92eb7922c0dd92df060b24e44fceb3d
23 lines
466 B
JavaScript
23 lines
466 B
JavaScript
/**
|
|
* 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.
|
|
*
|
|
* @format
|
|
* @flow
|
|
*/
|
|
|
|
export default function stringifyViewConfig(viewConfig: any): string {
|
|
return JSON.stringify(
|
|
viewConfig,
|
|
(key, val) => {
|
|
if (typeof val === 'function') {
|
|
return `ƒ ${val.name}`;
|
|
}
|
|
return val;
|
|
},
|
|
2,
|
|
);
|
|
}
|