rename host preload -> start (#37422)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37422

Changelog: [Internal]

in this simple change, i renamed the `preload` API, which triggers all the rct instance / javascript runtime creation to `start`. `preload` is a confusing API on the host because the host should be agnostic of when the timing to create its dependencies are, and the consumer should determine when initialization is lazy, early, etc.

Reviewed By: cipolleschi

Differential Revision: D45760583

fbshipit-source-id: bea26d21f950474352280292426a5facbe52b60f
This commit is contained in:
Phillip Pan
2023-05-12 22:26:10 -07:00
committed by Facebook GitHub Bot
parent a620498856
commit 61335a1367
2 changed files with 2 additions and 2 deletions
@@ -67,7 +67,7 @@ typedef std::shared_ptr<facebook::react::JSEngineInstance> (^RCTHostJSEngineProv
* main thread, but it should be threadsafe.
* TODO T74233481 - Verify if this function is threadsafe.
*/
- (void)preload;
- (void)start;
- (RCTFabricSurface *)createSurfaceWithModuleName:(NSString *)moduleName
mode:(facebook::react::DisplayMode)displayMode
@@ -140,7 +140,7 @@ NSString *const RCTHostDidReloadNotification = @"RCTHostDidReloadNotification";
#pragma mark - Public
- (void)preload
- (void)start
{
if (_instance) {
RCTLogWarn(