From 661d08ff4797ee9341aafed27d983a1e641d5693 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Wed, 20 Mar 2019 01:23:26 +0000 Subject: [PATCH] Deploy website Deploy website version based on 92b0daa2025af39dc0870960af6f871c898da4cd --- docs/next/appregistry.html | 2 +- docs/next/appregistry/index.html | 2 +- docs/next/native-modules-android.html | 4 +++- docs/next/native-modules-android/index.html | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/next/appregistry.html b/docs/next/appregistry.html index bb7d3372900..d8d0f3af282 100644 --- a/docs/next/appregistry.html +++ b/docs/next/appregistry.html @@ -129,7 +129,7 @@

registerCancellableHeadlessTask()

static registerCancellableHeadlessTask(taskKey, taskProvider, taskCancelProvider)
 
-

Register a headless task which can be cancelled. 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. @param taskCancelProvider a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP.

+

Register a headless task which can be cancelled. 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. @param taskCancelProvider a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP.

startHeadlessTask()

static startHeadlessTask(taskId, taskKey, data)
 
diff --git a/docs/next/appregistry/index.html b/docs/next/appregistry/index.html index bb7d3372900..d8d0f3af282 100644 --- a/docs/next/appregistry/index.html +++ b/docs/next/appregistry/index.html @@ -129,7 +129,7 @@

registerCancellableHeadlessTask()

static registerCancellableHeadlessTask(taskKey, taskProvider, taskCancelProvider)
 
-

Register a headless task which can be cancelled. 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. @param taskCancelProvider a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP.

+

Register a headless task which can be cancelled. 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. @param taskCancelProvider a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP.

startHeadlessTask()

static startHeadlessTask(taskId, taskKey, data)
 
diff --git a/docs/next/native-modules-android.html b/docs/next/native-modules-android.html index 72f502de0b9..adc229b3f9a 100644 --- a/docs/next/native-modules-android.html +++ b/docs/next/native-modules-android.html @@ -42,7 +42,7 @@

The Toast Module

This guide will use the Toast example. Let's say we would like to be able to create a toast message from JavaScript.

We start by creating a native module. A native module is a Java class that usually extends the ReactContextBaseJavaModule class and implements the functionality required by the JavaScript. Our goal here is to be able to write ToastExample.show('Awesome', ToastExample.SHORT); from JavaScript to display a short toast on the screen.

-

create a new Java Class named ToastModule.java inside android/app/src/main/java/com/your-app-name/ folder with the content below:

+

Create a new Java Class named ToastModule.java inside android/app/src/main/java/com/your-app-name/ folder with the content below:

// ToastModule.java
 
 package com.your-app-name;
@@ -150,6 +150,7 @@ ReadableArray -><
 }
 

To make it simpler to access your new functionality from JavaScript, it is common to wrap the native module in a JavaScript module. This is not necessary but saves the consumers of your library the need to pull it off of NativeModules each time. This JavaScript file also becomes a good location for you to add any JavaScript side functionality.

+

Create a new JavaScript file named ToastExample.js with the content below:

/**
  * This exposes the native ToastExample module as a JS module. This has a
  * function 'show' which takes the following parameters:
@@ -166,6 +167,7 @@ module.exports .show('Awesome', ToastExample.SHORT);
 
+

Please make sure this JavasScript file to be the same hierarchy as ToastExample.js.

Beyond Toasts

Callbacks

Native modules also support a special kind of argument - a callback. In most cases it is used to provide the function call result to JavaScript.

diff --git a/docs/next/native-modules-android/index.html b/docs/next/native-modules-android/index.html index 72f502de0b9..adc229b3f9a 100644 --- a/docs/next/native-modules-android/index.html +++ b/docs/next/native-modules-android/index.html @@ -42,7 +42,7 @@

The Toast Module

This guide will use the Toast example. Let's say we would like to be able to create a toast message from JavaScript.

We start by creating a native module. A native module is a Java class that usually extends the ReactContextBaseJavaModule class and implements the functionality required by the JavaScript. Our goal here is to be able to write ToastExample.show('Awesome', ToastExample.SHORT); from JavaScript to display a short toast on the screen.

-

create a new Java Class named ToastModule.java inside android/app/src/main/java/com/your-app-name/ folder with the content below:

+

Create a new Java Class named ToastModule.java inside android/app/src/main/java/com/your-app-name/ folder with the content below:

// ToastModule.java
 
 package com.your-app-name;
@@ -150,6 +150,7 @@ ReadableArray -><
 }
 

To make it simpler to access your new functionality from JavaScript, it is common to wrap the native module in a JavaScript module. This is not necessary but saves the consumers of your library the need to pull it off of NativeModules each time. This JavaScript file also becomes a good location for you to add any JavaScript side functionality.

+

Create a new JavaScript file named ToastExample.js with the content below:

/**
  * This exposes the native ToastExample module as a JS module. This has a
  * function 'show' which takes the following parameters:
@@ -166,6 +167,7 @@ module.exports .show('Awesome', ToastExample.SHORT);
 
+

Please make sure this JavasScript file to be the same hierarchy as ToastExample.js.

Beyond Toasts

Callbacks

Native modules also support a special kind of argument - a callback. In most cases it is used to provide the function call result to JavaScript.