From 1d390c8879a28d91f506f5b7de8cd0473e2b973f Mon Sep 17 00:00:00 2001 From: Yukiya Nakagawa Date: Wed, 10 Feb 2021 14:27:07 +0900 Subject: [PATCH] =?UTF-8?q?native-modules-intro=E3=81=AE=E3=82=BF=E3=82=A4?= =?UTF-8?q?=E3=83=88=E3=83=AB=E3=81=A8=E6=9C=80=E5=88=9D=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=83=A9=E3=82=B0=E3=83=A9=E3=83=95=E3=82=92=E8=A8=B3=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/native-modules-intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/native-modules-intro.md b/docs/native-modules-intro.md index 9da64609097..da346fd0f01 100644 --- a/docs/native-modules-intro.md +++ b/docs/native-modules-intro.md @@ -1,9 +1,9 @@ --- id: native-modules-intro -title: Native Modules Intro +title: はじめてのネイティブモジュール --- -Sometimes a React Native app needs to access a native platform API that is not available by default in JavaScript, for example the native APIs to access Apple or Android pay. Maybe you want to reuse some existing Objective-C, Swift, Java or C++ libraries without having to reimplement it in JavaScript, or write some high performance, multi-threaded code for things like image processing. +React Native でアプリを作っていると、JavaScript 向けの API が標準で提供されていない、各プラットフォームのネイティブな API にアクセスしたくなることがあります。Apple Pay や Android Pay にアクセスするためのネイティブな API はその一例です。きっと皆さんは、Objective-C や Swift、Java、C++などで実装された既存のライブラリを再利用したいでしょうし、それらを JavaScript で再実装するのは避けたいことでしょう。あるいは、画像処理などのために、ハイパフォーマンスかつマルチスレッドなコードをいくらか書きたいこともあるでしょう。 The NativeModule system exposes instances of Java/Objective-C/C++ (native) classes to JavaScript (JS) as JS objects, thereby allowing you to execute arbitrary native code from within JS. While we don't expect this feature to be part of the usual development process, it is essential that it exists. If React Native doesn't export a native API that your JS app needs you should be able to export it yourself!