Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ val preparePrefab by
"../ReactCommon/react/renderer/componentregistry/",
"react/renderer/componentregistry/",
),
Pair("../ReactCommon/react/renderer/componentregistry/React/", "React/"),
// react_renderer_consistency
Pair(
"../ReactCommon/react/renderer/consistency/",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native/ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ Pod::Spec.new do |s|
ss.header_dir = "react/renderer/componentregistry"
end

s.subspec "componentregistryUmbrella" do |ss|
ss.source_files = "react/renderer/componentregistry/React/*.h"
ss.header_dir = ""
ss.header_mappings_dir = "react/renderer/componentregistry"
end

s.subspec "componentregistrynative" do |ss|
ss.source_files = podspec_sources("react/renderer/componentregistry/native/**/*.{m,mm,cpp,h}", "react/renderer/componentregistry/native/**/*.{h}")
ss.header_dir = "react/renderer/componentregistry/native"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ file(GLOB react_renderer_componentregistry_SRC CONFIGURE_DEPENDS *.cpp)
add_library(react_renderer_componentregistry OBJECT ${react_renderer_componentregistry_SRC})

target_include_directories(react_renderer_componentregistry PUBLIC ${REACT_COMMON_DIR})
target_include_directories(react_renderer_componentregistry INTERFACE ${REACT_COMMON_DIR}/react/renderer/componentregistry)

target_link_libraries(react_renderer_componentregistry
folly_runtime
glog_init
jsi
react_cxxstableapi
react_debug
react_renderer_core
react_renderer_debug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <memory>

#include <react/renderer/core/ComponentDescriptor.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <react/renderer/core/ComponentDescriptor.h>
#include <react/renderer/core/EventDispatcher.h>
#include <react/utils/ContextContainer.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <shared_mutex>
#include <unordered_map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <memory>
#include <shared_mutex>
#include <unordered_map>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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

// =============================================================================
// Umbrella header for the `react/renderer/componentregistry` module - public
// entry point.
//
// #include <React/ComponentRegistry.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<react/renderer/componentregistry/...>`
// includes; only outside consumers use this umbrella.
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1

#include <react/renderer/componentregistry/ComponentDescriptorFactory.h>
#include <react/renderer/componentregistry/ComponentDescriptorProvider.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
#include <react/renderer/componentregistry/componentNameByReactViewName.h>

#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include <string>

namespace facebook::react {
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native/scripts/ios-prebuild/headers-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ const PodspecExceptions /*: {[key: string]: PodSpecConfiguration} */ = {
headerDir: 'react/renderer/componentregistry',
},

{
name: 'componentregistryUmbrella',
headerPatterns: ['react/renderer/componentregistry/React/*.h'],
headerDir: 'React',
},

{
name: 'componentregistrynative',
headerPatterns: ['react/renderer/componentregistry/native/**/*.h'],
Expand Down
Loading