mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: D27316129 made it mandatory for all RCTTurboModules to have a getTurboModule: method. So, there's no need to keep the getTurboModule:initParams method in RCTTurboModuleManagerDelegate. So, to simplify the TurboModule infra, this diff gets rid of that TurboModuleManager delegate method. Changelog: [iOS][Removed] - Delete RCTTurboModuleManagerDelegate getTurboModule:initParams Reviewed By: fkgozali Differential Revision: D27316873 fbshipit-source-id: c0b8449c6088bf08f17ba9a8d1c2cb644e5a242d
33 lines
850 B
Plaintext
33 lines
850 B
Plaintext
/*
|
|
* 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.
|
|
*/
|
|
|
|
#import "RNTesterTurboModuleProvider.h"
|
|
|
|
#import <React/CoreModulesPlugins.h>
|
|
#import <ReactCommon/SampleTurboCxxModule.h>
|
|
#import <ReactCommon/RCTSampleTurboModule.h>
|
|
|
|
// NOTE: This entire file should be codegen'ed.
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
Class RNTesterTurboModuleClassProvider(const char *name) {
|
|
return RCTCoreModulesClassProvider(name);
|
|
}
|
|
|
|
std::shared_ptr<TurboModule> RNTesterTurboModuleProvider(const std::string &name, std::shared_ptr<CallInvoker> jsInvoker) {
|
|
if (name == "SampleTurboCxxModule") {
|
|
return std::make_shared<SampleTurboCxxModule>(jsInvoker);
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|