Skip to content

Commit 2e51fa5

Browse files
fkgozalifacebook-github-bot
authored andcommitted
iOS: RCTSurface needs to re-register its root view on bridge reload
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
1 parent 48c339d commit 2e51fa5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

React/Base/Surface/RCTSurface.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ - (void)handleBridgeDidLoadJavaScriptNotification:(NSNotification *)notification
209209
}
210210

211211
if (isRerunNeeded) {
212+
[self _registerRootView];
212213
[self _run];
213214
}
214215
}

0 commit comments

Comments
 (0)