-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathindex.js
More file actions
38 lines (31 loc) · 1.05 KB
/
index.js
File metadata and controls
38 lines (31 loc) · 1.05 KB
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
import './shim';
// Polyfills
import 'expo-asset';
import 'intl';
import 'intl/locale-data/jsonp/en';
import 'react-native-get-random-values';
import 'react-native-url-polyfill/auto';
// React y Expo
import { registerRootComponent } from 'expo';
import { createElement } from 'react';
import { enableScreens } from 'react-native-screens';
import { Provider } from 'react-redux';
import { TailwindProvider } from 'tailwind-rn';
// App imports
import App from './src/App';
import plugins from './src/plugins';
import store from './src/store';
import utilities from './src/styles/tailwind.json';
enableScreens(false);
// Polyfill for btoa and atob
if (globalThis.btoa === undefined) {
// eslint-disable-next-line @typescript-eslint/no-var-requires, no-undef
const { encode, decode } = require('base-64');
globalThis.btoa = encode;
globalThis.atob = decode;
}
// Installs plugins
plugins.forEach((plugin) => plugin.install(store));
registerRootComponent(() =>
createElement(Provider, { store }, createElement(TailwindProvider, { utilities }, createElement(App))),
);