๐Ÿ“ฆ manideepk90 / react-native-hyperswitch-sdk

๐Ÿ“„ index.js ยท 32 lines
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/**
 * @format
 */

import {AppRegistry, Platform} from 'react-native';
import {ScriptManager, Script} from '@callstack/repack/client';
import App from './src/routes/Update';
import {name as appName} from './app.json';

// ScriptManager.shared.addResolver(async (scriptId, caller) => {
//   if (__DEV__) {
//     return {
//       url: Script.getDevServerURL(scriptId),
//       cache: false,
//     };
//   }
//   if (Platform.OS === 'android') {
//     return {
//       url: Script.getFileSystemURL(`assets://${scriptId}`),
//     };
//   } else if (Platform.OS === 'ios') {
//     return {
//       url: Script.getFileSystemURL(`${scriptId}`),
//     };
//   }
//   return {
//     url: Script.getRemoteURL(`https://URL.com/assets/v1/chunks/${scriptId}`),
//   };
// });

AppRegistry.registerComponent(appName, () => App);