Memoize lazy module configs
Reviewed By: javache Differential Revision: D3293010 fbshipit-source-id: feab7bb0a1f8990baea9c0aca8c9c3cccbcb04e8
This commit is contained in:
parent
ccef1b2941
commit
9a899bed65
|
@ -51,6 +51,11 @@ Object.keys(RemoteModules).forEach((moduleName) => {
|
|||
module = config && BatchedBridge.processModuleConfig(config, module.moduleID);
|
||||
RemoteModules[moduleName] = module;
|
||||
}
|
||||
Object.defineProperty(NativeModules, moduleName, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: module,
|
||||
});
|
||||
return module;
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue