mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
43ef2ffe78
Summary: ## Rationale Better separation of concerns. Less confusion. All the logic around TurboModule HostFunction management is in TurboModule::get(). And TurboModule::createHostFunction() is only responsible for creating the HostFunction. Also, there aren't two TurboModule::get functions, each with different/unclear responsibilities. ## Motivation The interop layer (i.e: D43918998) will have to override TurboModule::createHostFunction(): - TurboModule::createHostFunction() relies on static functions for method dispatch. - The interop layer cannot use static functions for method dispatch: interop modules' methods are only be discoverable at runtime. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D43918940 fbshipit-source-id: f2ffd210329a10967e9b2f0c925f4990cb470083