react-native/ReactCommon/fabric/uimanager/ComponentDescriptorFactory.h
David Vacca b421b5f4bd Open source Fabric android
Summary: This diff open sources Fabric Android implementation and it extracts ComponentDescriptorFactory into a function that can be "injected" per application

Reviewed By: shergin

Differential Revision: D13616172

fbshipit-source-id: 7b7a6461216740b5a1ad5ebbead9e37de4570221
2019-01-16 12:38:22 -08:00

35 lines
966 B
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 <memory>
#include <react/core/ComponentDescriptor.h>
#include <react/events/EventDispatcher.h>
#include <react/uimanager/ContextContainer.h>
#include "ComponentDescriptorRegistry.h"
namespace facebook {
namespace react {
/**
* A factory to provide hosting app specific set of ComponentDescriptor's.
* Each app must provide an implementation of the static class method which
* should register its specific set of supported components.
*/
using ComponentRegistryFactory =
std::function<SharedComponentDescriptorRegistry(
const SharedEventDispatcher &eventDispatcher,
const SharedContextContainer &contextContainer)>;
ComponentRegistryFactory getDefaultComponentRegistryFactory();
} // namespace react
} // namespace facebook