From 0d30eeccb8f82a952d991864922e51e40ea53a7b Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Wed, 20 Nov 2019 15:31:52 +0000 Subject: [PATCH] Deploy website Deploy website version based on 70c682876fdd5aceb8a1fa47de01bef44bfb992a --- docs/next/typescript.html | 9 +++++++-- docs/next/typescript/index.html | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/next/typescript.html b/docs/next/typescript.html index 59c3bf6aa29..9db87673c23 100644 --- a/docs/next/typescript.html +++ b/docs/next/typescript.html @@ -122,8 +122,13 @@ npm install --save-dev typescript @types/jest @types/react @types/react-native @ };
    -
  1. Rename a JavaScript file to be *.tsx

  2. -
  3. Run yarn tsc to type-check your new TypeScript files.

  4. +
  5. Rename a JavaScript file to be *.tsx
  6. +
+
+

You should leave the ./index.js entrypoint file as it is otherwise you may run into an issue when it comes to bundling a production build.

+
+
    +
  1. Run yarn tsc to type-check your new TypeScript files.

How TypeScript and React Native works

Out of the box, transforming your files to JavaScript works via the same Babel infrastructure as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are one or two caveats to using Babel instead of TypeScript.

diff --git a/docs/next/typescript/index.html b/docs/next/typescript/index.html index 59c3bf6aa29..9db87673c23 100644 --- a/docs/next/typescript/index.html +++ b/docs/next/typescript/index.html @@ -122,8 +122,13 @@ npm install --save-dev typescript @types/jest @types/react @types/react-native @ };
    -
  1. Rename a JavaScript file to be *.tsx

  2. -
  3. Run yarn tsc to type-check your new TypeScript files.

  4. +
  5. Rename a JavaScript file to be *.tsx
  6. +
+
+

You should leave the ./index.js entrypoint file as it is otherwise you may run into an issue when it comes to bundling a production build.

+
+
    +
  1. Run yarn tsc to type-check your new TypeScript files.

How TypeScript and React Native works

Out of the box, transforming your files to JavaScript works via the same Babel infrastructure as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are one or two caveats to using Babel instead of TypeScript.