/** * 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. */ #ifdef RN_FABRIC_ENABLED #include #include #include #include #include #include #include #include #include #include #include #include namespace facebook { namespace react { /** * This is a sample implementation. Each app should provide its own. */ ComponentRegistryFactory getDefaultComponentRegistryFactory() { return [](const EventDispatcher::Shared &eventDispatcher, const ContextContainer::Shared &contextContainer) { auto registry = std::make_shared(); registry->registerComponentDescriptor(std::make_shared(eventDispatcher)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher, contextContainer)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher, contextContainer)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher)); registry->registerComponentDescriptor(std::make_shared(eventDispatcher, contextContainer)); return registry; }; } } // namespace react } // namespace facebook #endif