diff --git a/docs/next/appregistry.html b/docs/next/appregistry.html index c8e4be04d78..2b7aada40ad 100644 --- a/docs/next/appregistry.html +++ b/docs/next/appregistry.html @@ -75,6 +75,16 @@

AppRegistry is the JS entry point to running all React Native apps. App root components should register themselves with AppRegistry.registerComponent, then the native system can load the bundle for the app and then actually run the app when it's ready by invoking AppRegistry.runApplication.

+
import {Text, AppRegistry} from 'react-native';
+
+const App = (props) => (
+  <View>
+    <Text>App1</Text>
+  </View>
+);
+
+AppRegistry.registerComponent('Appname', () => App);
+

To "stop" an application when a view should be destroyed, call AppRegistry.unmountApplicationComponentAtRootTag with the tag that was passed into runApplication. These should always be used as a pair.

AppRegistry should be required early in the require sequence to make sure the JS execution environment is setup before other modules are required.


@@ -257,6 +267,7 @@
static registerHeadlessTask(taskKey, taskProvider)
 

Register a headless task. A headless task is a bit of code that runs without a UI. @param taskKey the key associated with this task @param taskProvider a promise returning function that takes some data passed from the native side as the only argument; when the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context.

+

This is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music.

Parameters:

diff --git a/docs/next/appregistry/index.html b/docs/next/appregistry/index.html index c8e4be04d78..2b7aada40ad 100644 --- a/docs/next/appregistry/index.html +++ b/docs/next/appregistry/index.html @@ -75,6 +75,16 @@

AppRegistry is the JS entry point to running all React Native apps. App root components should register themselves with AppRegistry.registerComponent, then the native system can load the bundle for the app and then actually run the app when it's ready by invoking AppRegistry.runApplication.

+
import {Text, AppRegistry} from 'react-native';
+
+const App = (props) => (
+  <View>
+    <Text>App1</Text>
+  </View>
+);
+
+AppRegistry.registerComponent('Appname', () => App);
+

To "stop" an application when a view should be destroyed, call AppRegistry.unmountApplicationComponentAtRootTag with the tag that was passed into runApplication. These should always be used as a pair.

AppRegistry should be required early in the require sequence to make sure the JS execution environment is setup before other modules are required.


@@ -257,6 +267,7 @@
static registerHeadlessTask(taskKey, taskProvider)
 

Register a headless task. A headless task is a bit of code that runs without a UI. @param taskKey the key associated with this task @param taskProvider a promise returning function that takes some data passed from the native side as the only argument; when the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context.

+

This is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music.

Parameters: