mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e56950dc65
Summary: We need to break up the `uimanager` module in order to solve circular dependencies problem (which future diff would have otherwise). Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D20885163 fbshipit-source-id: 08eb1ba1d408fc0948e8d0da62380786a40973af
47 lines
1.9 KiB
C++
47 lines
1.9 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its 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/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
#include <react/components/root/RootComponentDescriptor.h>
|
|
#include <react/components/scrollview/ScrollViewComponentDescriptor.h>
|
|
#include <react/components/text/ParagraphComponentDescriptor.h>
|
|
#include <react/components/text/RawTextComponentDescriptor.h>
|
|
#include <react/components/text/TextComponentDescriptor.h>
|
|
#include <react/components/view/ViewComponentDescriptor.h>
|
|
#include <react/element/ComponentBuilder.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
inline ComponentBuilder simpleComponentBuilder() {
|
|
ComponentDescriptorProviderRegistry componentDescriptorProviderRegistry{};
|
|
auto eventDispatcher = EventDispatcher::Shared{};
|
|
auto componentDescriptorRegistry =
|
|
componentDescriptorProviderRegistry.createComponentDescriptorRegistry(
|
|
ComponentDescriptorParameters{eventDispatcher, nullptr, nullptr});
|
|
|
|
componentDescriptorProviderRegistry.add(
|
|
concreteComponentDescriptorProvider<RootComponentDescriptor>());
|
|
componentDescriptorProviderRegistry.add(
|
|
concreteComponentDescriptorProvider<ViewComponentDescriptor>());
|
|
componentDescriptorProviderRegistry.add(
|
|
concreteComponentDescriptorProvider<ScrollViewComponentDescriptor>());
|
|
componentDescriptorProviderRegistry.add(
|
|
concreteComponentDescriptorProvider<ParagraphComponentDescriptor>());
|
|
componentDescriptorProviderRegistry.add(
|
|
concreteComponentDescriptorProvider<TextComponentDescriptor>());
|
|
componentDescriptorProviderRegistry.add(
|
|
concreteComponentDescriptorProvider<RawTextComponentDescriptor>());
|
|
|
|
return ComponentBuilder{componentDescriptorRegistry};
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|