Skip to content

Commit

Permalink
rename host preload -> start (#37422)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
philIip authored and facebook-github-bot committed May 13, 2023
1 parent a620498 commit 61335a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ - (instancetype)initWithHostDelegate:(id<RCTHostDelegate>)hostDelegate

#pragma mark - Public

- (void)preload
- (void)start
{
if (_instance) {
RCTLogWarn(
Expand Down

0 comments on commit 61335a1

Please sign in to comment.