Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Conversation

@lostintangent
Copy link
Member

The way that we're currently reloading the app after an update has a couple of issues:

  1. It requires us to know the name of the root component. To do this, we'd either have to ask the user for it (e.g. adding a param to the getBundleUrl method) and/or assume the name is predictable. This is what we currently do
  2. It wouldn't support a React Native app that was embedded within another iOS app, because the restart assumes that the root view controller can be completely replaced

This change solves both issues by simply telling the React Native runtime about the new bundle URL and then asking it to reload. This way, we don't need to know where in the view hierarchy the React view lives and/or what the user's root component is named.

@dtivel
Copy link
Member

dtivel commented Nov 2, 2015

Looks good.

@geof90
Copy link
Contributor

geof90 commented Nov 2, 2015

LGTM

lostintangent added a commit that referenced this pull request Nov 2, 2015
@lostintangent lostintangent merged commit c3033ef into master Nov 2, 2015
@lostintangent lostintangent deleted the reload_change branch November 2, 2015 23:23
@qingfeng
Copy link
Contributor

qingfeng commented Nov 3, 2015

🍻

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

5 participants