-
Notifications
You must be signed in to change notification settings - Fork 138
/
index.js
38 lines (31 loc) · 1.3 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This is the first file that ReactNative will run when it starts up.
//
// We jump out of here immediately and into our main entry point instead.
//
// It is possible to have React Native load our main module first, but we'd have to
// change that in both AppDelegate.m and MainApplication.java. This would have the
// side effect of breaking other tooling like mobile-center and react-native-rename.
//
// It's easier just to leave it here.
import * as React from "react"
import { AppRegistry, LogBox } from "react-native"
import { App } from "./app/app.tsx"
// Disables showing errors and warnings on UI - they still get shown on console
// Ensures elements are visible deterministically during tests
LogBox.ignoreAllLogs(true)
/**
* This needs to match what's found in your app_delegate.m and MainActivity.java.
*/
const APP_NAME = "GaloyApp"
// Should we show storybook instead of our app?
//
// ⚠️ Leave this as `false` when checking into git.
const SHOW_STORYBOOK = false
let RootComponent = () => <App />
if (__DEV__ && SHOW_STORYBOOK) {
// Only include Storybook if we're in dev mode
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { StorybookUIRoot } = require("./.storybook/index.ts")
RootComponent = StorybookUIRoot
}
AppRegistry.registerComponent(APP_NAME, () => RootComponent)