mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-13 09:21:46 +08:00
Fabric: Introducing ContextContainer
Summary: @public `ContextContainer` is general purpose DI container for Fabric. We need this to communicate some enviroment-specific and/or platform-specific modules down to cross-platform C++ code. The first one will be ImageManager. Soon. Reviewed By: fkgozali Differential Revision: D8475636 fbshipit-source-id: 0afc65063f818d0bab736cd2c55c6fdd21b629ac
This commit is contained in:
committed by
Facebook Github Bot
parent
0a20f47021
commit
c674303dfd
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <fabric/uimanager/ComponentDescriptorFactory.h>
|
||||
#include <fabric/uimanager/ComponentDescriptorRegistry.h>
|
||||
#include <fabric/uimanager/ContextContainer.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
@@ -14,7 +15,10 @@ namespace react {
|
||||
/**
|
||||
* This is a sample implementation. Each app should provide its own.
|
||||
*/
|
||||
SharedComponentDescriptorRegistry ComponentDescriptorFactory::buildRegistry(const SharedEventDispatcher &eventDispatcher) {
|
||||
SharedComponentDescriptorRegistry ComponentDescriptorFactory::buildRegistry(
|
||||
const SharedEventDispatcher &eventDispatcher,
|
||||
const SharedContextContainer &contextContainer
|
||||
) {
|
||||
auto registry = std::make_shared<ComponentDescriptorRegistry>();
|
||||
return registry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user