Skip to content

Commit df3a1ca

Browse files
committed
Add a __DEV__ export value that fail
1 parent 8153340 commit df3a1ca

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

packages/react-native/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,20 @@ if (__DEV__) {
400400
);
401401
},
402402
});
403+
404+
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
405+
* attempting to access SafeAreaView. */
406+
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
407+
* attempting to access SafeAreaView. */
408+
Object.defineProperty(module.exports, 'SafeAreaView', {
409+
configurable: true,
410+
get() {
411+
invariant(
412+
false,
413+
'SafeAreaView has been removed from react-native core. ' +
414+
"Please use 'react-native-safe-area-context' instead. " +
415+
'See https://github.com/AppAndFlow/react-native-safe-area-context',
416+
);
417+
},
418+
});
403419
}

0 commit comments

Comments
 (0)