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/38703 This change consolidates the pattern for setting up out-of-tree platform options for core classes like ViewProps and ViewEventEmitter. A similar pattern was used for Touch.h. As we move towards documenting how to build an out-of-tree platform, it would be nice to specify a set of HostPlatformX classes that need to be implemented and made resolvable from specific header paths. At this point, there is: - HostPlatformViewProps - HostPlatformViewEventEmitter - HostPlatformViewTraitsInitializer - HostPlatformTouch - HostPlatformColor The other benefit of this pattern is to DRY helper aliases like SharedViewEventEmitter and SharedViewProps. ## Changelog: [General] [Added] - Use more consistent pattern for out-of-tree platform Fabric C++ class extensions Reviewed By: christophpurrer Differential Revision: D47917598 fbshipit-source-id: 58ee9677eefd34eb0bc2d321103314642c457cd8
16 lines
430 B
C++
16 lines
430 B
C++
/*
|
|
* 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.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <react/renderer/components/view/HostPlatformViewProps.h>
|
|
|
|
namespace facebook::react {
|
|
using ViewProps = HostPlatformViewProps;
|
|
using SharedViewProps = std::shared_ptr<ViewProps const>;
|
|
} // namespace facebook::react
|