Files
react-native/ReactCommon/react/nativemodule
Ramanpreet Nara 43ef2ffe78 Refactor: Move HostFunction management logic to TurboModule::get()
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
2023-03-11 16:59:39 -08:00
..