Skip to content

Commit

Permalink
iOS: RCTSurface needs to re-register its root view on bridge reload
Browse files Browse the repository at this point in the history
Summary: When reloading JS during development, surface needs to make sure the root view gets re-registered before attempting to remount it. This fixes redbox on JS reload.

Reviewed By: shergin

Differential Revision: D7170416

fbshipit-source-id: c84b999d2cdc35cb9e26feef2a1e1a7ce35cfa70
  • Loading branch information
fkgozali authored and facebook-github-bot committed Mar 6, 2018
1 parent 48c339d commit 2e51fa5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions React/Base/Surface/RCTSurface.mm
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ - (void)handleBridgeDidLoadJavaScriptNotification:(NSNotification *)notification
}

if (isRerunNeeded) {
[self _registerRootView];
[self _run];
}
}
Expand Down

0 comments on commit 2e51fa5

Please sign in to comment.