Created
September 18, 2016 16:08
-
-
Save dabbott/9a2849de563cc6f402a2d0e5a8a39bde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AppRegistry } from 'react-native' | |
let entry = require('actual-entry-file.js') | |
// Check if we're dealing with ES6-style imports | |
if (typeof entry === 'object' && entry !== null && entry._esModule) { | |
// If we are, pick the default import | |
entry = entry.default | |
} | |
if (typeof entry === 'function') { | |
AppRegistry.registerComponent(() => entry) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment