Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Libraries/react-native/react-native-implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ const invariant = require('fbjs/lib/invariant');

// Export React, plus some native additions.
const ReactNative = {
// Dummy export, to catch attempts to import *
get _() {
invariant(
false,
'Importing all exports from react-native (eg `import * as Foo from "react-native"` is not ' +
'supported. Please be explicit instead (eg `import { Bar } from "react-native"`)'
);
},

// Components
get AccessibilityInfo() { return require('AccessibilityInfo'); },
get ActivityIndicator() { return require('ActivityIndicator'); },
Expand Down