mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deploy website
Deploy website version based on 70c682876fdd5aceb8a1fa47de01bef44bfb992a
This commit is contained in:
@@ -122,8 +122,13 @@ npm install --save-dev typescript @types/jest @types/react @types/react-native @
|
||||
<span class="token punctuation">}</span><span class="token punctuation">;</span>
|
||||
</code></pre>
|
||||
<ol start="4">
|
||||
<li><p>Rename a JavaScript file to be <code>*.tsx</code></p></li>
|
||||
<li><p>Run <code>yarn tsc</code> to type-check your new TypeScript files.</p></li>
|
||||
<li>Rename a JavaScript file to be <code>*.tsx</code></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>You should leave the <code>./index.js</code> entrypoint file as it is otherwise you may run into an issue when it comes to bundling a production build.</p>
|
||||
</blockquote>
|
||||
<ol start="5">
|
||||
<li>Run <code>yarn tsc</code> to type-check your new TypeScript files.</li>
|
||||
</ol>
|
||||
<h2><a class="anchor" aria-hidden="true" id="how-typescript-and-react-native-works"></a><a href="#how-typescript-and-react-native-works" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>How TypeScript and React Native works</h2>
|
||||
<p>Out of the box, transforming your files to JavaScript works via the same <a href="/react-native/docs/javascript-environment#javascript-syntax-transformers">Babel infrastructure</a> 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 <a href="https://babeljs.io/docs/en/next/babel-plugin-transform-typescript">one or two caveats</a> to using Babel instead of TypeScript.</p>
|
||||
|
||||
@@ -122,8 +122,13 @@ npm install --save-dev typescript @types/jest @types/react @types/react-native @
|
||||
<span class="token punctuation">}</span><span class="token punctuation">;</span>
|
||||
</code></pre>
|
||||
<ol start="4">
|
||||
<li><p>Rename a JavaScript file to be <code>*.tsx</code></p></li>
|
||||
<li><p>Run <code>yarn tsc</code> to type-check your new TypeScript files.</p></li>
|
||||
<li>Rename a JavaScript file to be <code>*.tsx</code></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>You should leave the <code>./index.js</code> entrypoint file as it is otherwise you may run into an issue when it comes to bundling a production build.</p>
|
||||
</blockquote>
|
||||
<ol start="5">
|
||||
<li>Run <code>yarn tsc</code> to type-check your new TypeScript files.</li>
|
||||
</ol>
|
||||
<h2><a class="anchor" aria-hidden="true" id="how-typescript-and-react-native-works"></a><a href="#how-typescript-and-react-native-works" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>How TypeScript and React Native works</h2>
|
||||
<p>Out of the box, transforming your files to JavaScript works via the same <a href="/react-native/docs/javascript-environment#javascript-syntax-transformers">Babel infrastructure</a> 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 <a href="https://babeljs.io/docs/en/next/babel-plugin-transform-typescript">one or two caveats</a> to using Babel instead of TypeScript.</p>
|
||||
|
||||
Reference in New Issue
Block a user