File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/react-native/ReactAndroid/src/main/java/com/facebook/react Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,15 @@ public void invokeDefaultOnBackPressed() {
328328 }
329329
330330 registerCxxErrorHandlerFunc ();
331+
332+ // Using `if (true)` just to prevent tests / lint errors.
333+ if (true ) {
334+ // Legacy architecture of React Native is deprecated and can't be initialized anymore.
335+ // More details on:
336+ // https://github.com/react-native-community/discussions-and-proposals/blob/nc/legacy-arch-removal/proposals/0929-legacy-architecture-removal.md
337+ throw new UnsupportedOperationException (
338+ "ReactInstanceManager.createReactContext is unsupported." );
339+ }
331340 }
332341
333342 private ReactInstanceDevHelper createDevHelperInterface () {
@@ -1446,6 +1455,7 @@ private void tearDownReactContext(ReactContext reactContext) {
14461455 */
14471456 private ReactApplicationContext createReactContext (
14481457 JavaScriptExecutor jsExecutor , JSBundleLoader jsBundleLoader ) {
1458+
14491459 FLog .d (ReactConstants .TAG , "ReactInstanceManager.createReactContext()" );
14501460 ReactMarker .logMarker (CREATE_REACT_CONTEXT_START , jsExecutor .getName ());
14511461
You can’t perform that action at this time.
0 commit comments