Updated docs for next

This commit is contained in:
Website Deployment Script
2016-08-27 20:50:27 +00:00
parent 8845c347b1
commit ae5b992bc7
@@ -245,7 +245,7 @@ $ react<span class="token operator">-</span>native run<span class="token operato
</span><p>You can examine the code that added the React Native screen on <a href="https://github.com/JoelMarcey/swift-2048/commit/13272a31ee6dd46dc68b1dcf4eaf16c1a10f5229" target="_blank">GitHub</a>.</p><span><block class="android" />
</span><h2><a class="anchor" name="add-js-to-your-app"></a>Add JS to your app <a class="hash-link" href="docs/integration-with-existing-apps.html#add-js-to-your-app">#</a></h2><p>In your app&#x27;s root folder, run:</p><div class="prism language-javascript">$ npm init
$ npm install <span class="token operator">--</span>save react<span class="token operator">-</span>native
$ npm install <span class="token operator">--</span>save react react<span class="token operator">-</span>native
$ curl <span class="token operator">-</span>o <span class="token punctuation">.</span>flowconfig https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>raw<span class="token punctuation">.</span>githubusercontent<span class="token punctuation">.</span>com<span class="token operator">/</span>facebook<span class="token operator">/</span>react<span class="token operator">-</span>native<span class="token regex">/master/</span><span class="token punctuation">.</span>flowconfig</div><p>This creates a node module for your app and adds the <code>react-native</code> npm dependency. Now open the newly created <code>package.json</code> file and add this under <code>scripts</code>:</p><div class="prism language-javascript"><span class="token string">&quot;start&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;node node_modules/react-native/local-cli/cli.js start&quot;</span></div><p>Copy &amp; paste the following code to <code>index.android.js</code> in your root folder — it&#x27;s a barebones React Native app:</p><div class="prism language-javascript"><span class="token string">&#x27;use strict&#x27;</span><span class="token punctuation">;</span>
import React from <span class="token string">&#x27;react&#x27;</span><span class="token punctuation">;</span>