mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Updated docs for next
This commit is contained in:
@@ -248,11 +248,15 @@ folder in <a href="http://nuclide.io" target="_blank">Nuclide</a> and
|
||||
|
||||
</span><h2><a class="anchor" name="testing-installation"></a>Testing Installation <a class="hash-link" href="docs/getting-started.html#testing-installation">#</a></h2><div class="prism language-javascript">react<span class="token operator">-</span>native init AwesomeProject
|
||||
cd AwesomeProject
|
||||
react<span class="token operator">-</span>native run<span class="token operator">-</span>android</div><span><block class="windows android" />
|
||||
react<span class="token operator">-</span>native run<span class="token operator">-</span>android</div><span><block class="windows linux android" />
|
||||
|
||||
</span><h3><a class="anchor" name="troubleshooting-run"></a>Troubleshooting Run <a class="hash-link" href="docs/getting-started.html#troubleshooting-run">#</a></h3><p>A common issue on Windows is that the packager is not started automatically when you run
|
||||
</span><h3><a class="anchor" name="troubleshooting-run"></a>Troubleshooting Run <a class="hash-link" href="docs/getting-started.html#troubleshooting-run">#</a></h3><p>A common issue is that the packager is not started automatically when you run
|
||||
<code>react-native run-android</code>. You can start it manually using:</p><div class="prism language-javascript">cd AwesomeProject
|
||||
react<span class="token operator">-</span>native start</div><p>Or if you hit a <code>ERROR Watcher took too long to load</code> on Windows, try increasing the timeout in <a href="https://github.com/facebook/react-native/blob/5fa33f3d07f8595a188f6fe04d6168a6ede1e721/packager/react-packager/src/DependencyResolver/FileWatcher/index.js#L16" target="_blank">this file</a> (under your <code>node_modules/react-native/</code>).</p><h3><a class="anchor" name="modifying-project"></a>Modifying Project <a class="hash-link" href="docs/getting-started.html#modifying-project">#</a></h3><p>Now that you successfully started the project, let's modify it:</p><ul><li>Press the <code>R</code> key twice <strong>OR</strong> open the menu (F2 by default, or ⌘-M in Genymotion) and select Reload JS to see your change!</li><li>Run <code>adb logcat *:S ReactNative:V ReactNativeJS:V</code> in a terminal to see your app's logs</li></ul><h3><a class="anchor" name="that-s-it"></a>That's It <a class="hash-link" href="docs/getting-started.html#that-s-it">#</a></h3><p>Congratulations! You've successfully run and modified your first React Native app.</p><span><center><img src="https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-xfa1/t39.1997-6/851555_209575209232981_1876032292_n.png" width="150"></img></center>
|
||||
react<span class="token operator">-</span>native start</div><span><block class="windows android" />
|
||||
|
||||
</span><p>Or if you hit a <code>ERROR Watcher took too long to load</code> on Windows, try increasing the timeout in <a href="https://github.com/facebook/react-native/blob/5fa33f3d07f8595a188f6fe04d6168a6ede1e721/packager/react-packager/src/DependencyResolver/FileWatcher/index.js#L16" target="_blank">this file</a> (under your <code>node_modules/react-native/</code>).</p><span><block class="windows linux android" />
|
||||
|
||||
</span><h3><a class="anchor" name="modifying-project"></a>Modifying Project <a class="hash-link" href="docs/getting-started.html#modifying-project">#</a></h3><p>Now that you successfully started the project, let's modify it:</p><ul><li>Open <code>index.android.js</code> in your text editor of choice (e.g. <a href="http://nuclide.io/docs/platforms/react-native/" target="_blank">Nuclide</a>) and edit some lines.</li><li>Press the <code>R</code> key twice <strong>OR</strong> open the menu (F2 by default, or ⌘-M in the emulator) and select Reload JS to see your change!</li><li>Run <code>adb logcat *:S ReactNative:V ReactNativeJS:V</code> in a terminal to see your app's logs</li></ul><h3><a class="anchor" name="that-s-it"></a>That's It <a class="hash-link" href="docs/getting-started.html#that-s-it">#</a></h3><p>Congratulations! You've successfully run and modified your first React Native app.</p><span><center><img src="https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-xfa1/t39.1997-6/851555_209575209232981_1876032292_n.png" width="150"></img></center>
|
||||
|
||||
|
||||
</span><span><block class="mac ios android" />
|
||||
|
||||
Reference in New Issue
Block a user