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
This commit is contained in:
David Vacca
2019-01-16 12:01:45 -08:00
committed by Facebook Github Bot
parent cfbb2278a0
commit b421b5f4bd
45 changed files with 2738 additions and 52 deletions
@@ -15,11 +15,12 @@ namespace react {
/**
* This is a sample implementation. Each app should provide its own.
*/
SharedComponentDescriptorRegistry ComponentDescriptorFactory::buildRegistry(
const SharedEventDispatcher &eventDispatcher,
const SharedContextContainer &contextContainer) {
auto registry = std::make_shared<ComponentDescriptorRegistry>();
return registry;
ComponentRegistryFactory getDefaultComponentRegistryFactory() {
return [](const SharedEventDispatcher &eventDispatcher,
const SharedContextContainer &contextContainer) {
auto registry = std::make_shared<ComponentDescriptorRegistry>();
return registry;
}
}
} // namespace react