0

Here is the index.js in my React Native 0.70.x app.

/**
 * @format
 */
import 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import codePush from "react-native-code-push";  //code push


AppRegistry.registerComponent(appName, () => App); //How to re AddRegistry again after the app has launched?

The situation is after the app has launched and gets users consent of privacy policy, the app needs to be re AppRegistry with the code (code push) below:

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

Is there a way to relaunch the app (re AppRegistry) with codePush as above?

user938363
  • 9,990
  • 38
  • 137
  • 303

0 Answers0