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:
@@ -28,7 +28,7 @@ dependencies <span class="token punctuation">{</span>
|
||||
rootProject<span class="token punctuation">.</span>allprojects <span class="token punctuation">{</span>
|
||||
buildDir <span class="token operator">=</span> <span class="token string">"/path/to/build/directory/${rootProject.name}/${project.name}"</span>
|
||||
<span class="token punctuation">}</span>
|
||||
<span class="token punctuation">}</span></div><h2><a class="anchor" name="testing"></a>Testing <a class="hash-link" href="docs/android-building-from-source.html#testing">#</a></h2><p>If you made changes to React Native and submit a pull request, all tests will run on your pull request automatically. To run the tests locally, see <a href="docs/testing.html" target="_blank">Testing</a>.</p><h2><a class="anchor" name="troubleshooting"></a>Troubleshooting <a class="hash-link" href="docs/android-building-from-source.html#troubleshooting">#</a></h2><p>Gradle build fails in <code>ndk-build</code>. See the section about <code>local.properties</code> file above.</p></div><div class="docs-prevnext"><a class="docs-prev" href="docs/android-ui-performance.html#content">← Prev</a><a class="docs-next" href="docs/activityindicator.html#content">Next →</a></div><p class="edit-page-block">You can <a target="_blank" href="https://github.com/facebook/react-native/blob/master/docs/AndroidBuildingFromSource.md">edit the content above on GitHub</a> and send us a pull request!</p></div></section><footer class="nav-footer"><section class="sitemap"><a href="/react-native" class="nav-home"><img src="img/header_logo.png" alt="React Native" width="66" height="58"></a><div><h5><a href="docs/">Docs</a></h5><a href="docs/getting-started.html">Getting Started</a><a href="docs/tutorial.html">Tutorial</a><a href="docs/integration-with-existing-apps.html">Integration With Existing Apps</a><a href="docs/more-resources.html">More Resources</a></div><div><h5><a href="/react-native/support.html">Community</a></h5><a href="/react-native/showcase.html">Showcase</a><a href="http://www.meetup.com/topics/react-native/" target="_blank">Upcoming Events</a><a href="https://www.facebook.com/groups/react.native.community" target="_blank">Facebook Group</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a></div><div><h5><a href="/react-native/support.html">Help</a></h5><a href="http://stackoverflow.com/questions/tagged/react-native" target="_blank">Stack Overflow</a><a href="https://discord.gg/0ZcbPKXt5bZjGY5n">Reactiflux Chat</a><a href="/react-native/versions.html" target="_blank">Latest Releases</a><a href="https://react-native.canny.io/feature-requests" target="_blank">Feature Requests</a></div><div><h5>More</h5><a href="/react-native/blog">Blog</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="http://facebook.github.io/react/" target="_blank">React</a></div></section><section class="newsletter"><div id="mc_embed_signup"><form action="//reactnative.us10.list-manage.com/subscribe/post?u=db0dd948e2b729ee62625b1a8&id=47cd41008f" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate><div id="mc_embed_signup_scroll"><label for="mce-EMAIL"><h5>Get the React Native Newsletter</h5></label><input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required><div style="position:absolute;left:-5000px;" aria-hidden="true"><input type="text" name="b_db0dd948e2b729ee62625b1a8_47cd41008f" tabindex="-1" value=""></div><div class="clear"><input type="submit" value="Sign up" name="subscribe" id="mc-embedded-subscribe" class="button"></div></div></form></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"></a><section class="copyright">Copyright © 2017 Facebook Inc.</section></footer></div><div id="fb-root"></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
|
||||
<span class="token punctuation">}</span></div><h2><a class="anchor" name="building-for-maven-nexus-deployment"></a>Building for Maven/Nexus deployment <a class="hash-link" href="docs/android-building-from-source.html#building-for-maven-nexus-deployment">#</a></h2><p>If you find that you need to push up a locally compiled React Native .aar and related files to a remote Nexus repository, you can.</p><p>Start by following the <code>Point Gradle to your Android SDK</code> section of this page. Once you do this, assuming you have Gradle configured properly, you can then run the following command from the root of your React Native checkout to build and package all required files:</p><div class="prism language-javascript"><span class="token punctuation">.</span><span class="token operator">/</span>gradlew ReactAndroid<span class="token punctuation">:</span>installArchives</div><p>This will package everything that would typically be included in the <code>android</code> directory of your <code>node_modules/react-native/</code> installation in the root directory of your React Native checkout. </p><h2><a class="anchor" name="testing"></a>Testing <a class="hash-link" href="docs/android-building-from-source.html#testing">#</a></h2><p>If you made changes to React Native and submit a pull request, all tests will run on your pull request automatically. To run the tests locally, see <a href="docs/testing.html" target="_blank">Testing</a>.</p><h2><a class="anchor" name="troubleshooting"></a>Troubleshooting <a class="hash-link" href="docs/android-building-from-source.html#troubleshooting">#</a></h2><p>Gradle build fails in <code>ndk-build</code>. See the section about <code>local.properties</code> file above.</p></div><div class="docs-prevnext"><a class="docs-prev" href="docs/android-ui-performance.html#content">← Prev</a><a class="docs-next" href="docs/activityindicator.html#content">Next →</a></div><p class="edit-page-block">You can <a target="_blank" href="https://github.com/facebook/react-native/blob/master/docs/AndroidBuildingFromSource.md">edit the content above on GitHub</a> and send us a pull request!</p></div></section><footer class="nav-footer"><section class="sitemap"><a href="/react-native" class="nav-home"><img src="img/header_logo.png" alt="React Native" width="66" height="58"></a><div><h5><a href="docs/">Docs</a></h5><a href="docs/getting-started.html">Getting Started</a><a href="docs/tutorial.html">Tutorial</a><a href="docs/integration-with-existing-apps.html">Integration With Existing Apps</a><a href="docs/more-resources.html">More Resources</a></div><div><h5><a href="/react-native/support.html">Community</a></h5><a href="/react-native/showcase.html">Showcase</a><a href="http://www.meetup.com/topics/react-native/" target="_blank">Upcoming Events</a><a href="https://www.facebook.com/groups/react.native.community" target="_blank">Facebook Group</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a></div><div><h5><a href="/react-native/support.html">Help</a></h5><a href="http://stackoverflow.com/questions/tagged/react-native" target="_blank">Stack Overflow</a><a href="https://discord.gg/0ZcbPKXt5bZjGY5n">Reactiflux Chat</a><a href="/react-native/versions.html" target="_blank">Latest Releases</a><a href="https://react-native.canny.io/feature-requests" target="_blank">Feature Requests</a></div><div><h5>More</h5><a href="/react-native/blog">Blog</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="http://facebook.github.io/react/" target="_blank">React</a></div></section><section class="newsletter"><div id="mc_embed_signup"><form action="//reactnative.us10.list-manage.com/subscribe/post?u=db0dd948e2b729ee62625b1a8&id=47cd41008f" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate><div id="mc_embed_signup_scroll"><label for="mce-EMAIL"><h5>Get the React Native Newsletter</h5></label><input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required><div style="position:absolute;left:-5000px;" aria-hidden="true"><input type="text" name="b_db0dd948e2b729ee62625b1a8_47cd41008f" tabindex="-1" value=""></div><div class="clear"><input type="submit" value="Sign up" name="subscribe" id="mc-embedded-subscribe" class="button"></div></div></form></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"></a><section class="copyright">Copyright © 2017 Facebook Inc.</section></footer></div><div id="fb-root"></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -20,7 +20,7 @@ const App <span class="token operator">=</span> <span class="token function">Sta
|
||||
<span class="token operator">/</span><span class="token operator">></span>
|
||||
<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token punctuation">}</span>
|
||||
<span class="token punctuation">}</span></div><p>React Navigation routers make it easy to override navigation logic or integrate it into redux. Because routers can be nested inside eachother, developers can override navigation logic for one area of the app without making widespread changes.</p><p>The views in React Navigation use native components and the <code>Animated</code> library to deliver 60fps animations that are run on the native thread. Plus, the animations and gestures can be easily customized.</p><p>For a complete intro to React Navigation, follow the <a href="https://reactnavigation.org/docs/intro/" target="_blank">getting started guide</a>, or browse other docs such as the <a href="https://reactnavigation.org/docs/navigators/" target="_blank">intro to navigators</a>.</p><h2><a class="anchor" name="navigator"></a>Navigator <a class="hash-link" href="docs/navigation.html#navigator">#</a></h2><p>Like React Navigation, <code>Navigator</code> provides a JavaScript implementation of a navigation stack, so it works on both iOS and Android and is easy to customize. Navigator was released alongside React Native in 2015, so it predates the Animated library with native-thread animations.</p><p><img src="img/NavigationStack-Navigator.gif" alt=""></p><p><code>Navigator</code> can be adapted to render different components based on the current route in its <code>renderScene</code> function. It will transition new scenes onto the screen by sliding in from the right by default, but you can control this behavior by using the <code>configureScene</code> function. You can also configure a navigation bar through the <code>navigationBar</code> prop.</p><p>Check out the <a href="docs/navigator.html" target="_blank">Navigator API reference</a> for specific examples that cover each of these scenarios.</p><h2><a class="anchor" name="navigatorios"></a>NavigatorIOS <a class="hash-link" href="docs/navigation.html#navigatorios">#</a></h2><p>If you are targeting iOS only, you may also want to consider using <a href="docs/navigatorios.html" target="_blank">NavigatorIOS</a>. It looks and feels just like <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationController_Class/" target="_blank"><code>UINavigationController</code></a>, because it is actually built on top of it.</p><p><img src="img/NavigationStack-NavigatorIOS.gif" alt=""></p><div class="prism language-javascript"><NavigatorIOS
|
||||
<span class="token punctuation">}</span></div><p>React Navigation routers make it easy to override navigation logic or integrate it into redux. Because routers can be nested inside each other, developers can override navigation logic for one area of the app without making widespread changes.</p><p>The views in React Navigation use native components and the <code>Animated</code> library to deliver 60fps animations that are run on the native thread. Plus, the animations and gestures can be easily customized.</p><p>For a complete intro to React Navigation, follow the <a href="https://reactnavigation.org/docs/intro/" target="_blank">getting started guide</a>, or browse other docs such as the <a href="https://reactnavigation.org/docs/navigators/" target="_blank">intro to navigators</a>.</p><h2><a class="anchor" name="navigator"></a>Navigator <a class="hash-link" href="docs/navigation.html#navigator">#</a></h2><p>Like React Navigation, <code>Navigator</code> provides a JavaScript implementation of a navigation stack, so it works on both iOS and Android and is easy to customize. Navigator was released alongside React Native in 2015, so it predates the Animated library with native-thread animations.</p><p><img src="img/NavigationStack-Navigator.gif" alt=""></p><p><code>Navigator</code> can be adapted to render different components based on the current route in its <code>renderScene</code> function. It will transition new scenes onto the screen by sliding in from the right by default, but you can control this behavior by using the <code>configureScene</code> function. You can also configure a navigation bar through the <code>navigationBar</code> prop.</p><p>Check out the <a href="docs/navigator.html" target="_blank">Navigator API reference</a> for specific examples that cover each of these scenarios.</p><h2><a class="anchor" name="navigatorios"></a>NavigatorIOS <a class="hash-link" href="docs/navigation.html#navigatorios">#</a></h2><p>If you are targeting iOS only, you may also want to consider using <a href="docs/navigatorios.html" target="_blank">NavigatorIOS</a>. It looks and feels just like <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationController_Class/" target="_blank"><code>UINavigationController</code></a>, because it is actually built on top of it.</p><p><img src="img/NavigationStack-NavigatorIOS.gif" alt=""></p><div class="prism language-javascript"><NavigatorIOS
|
||||
initialRoute<span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>
|
||||
component<span class="token punctuation">:</span> MyScene<span class="token punctuation">,</span>
|
||||
title<span class="token punctuation">:</span> <span class="token string">'My Initial Scene'</span><span class="token punctuation">,</span>
|
||||
|
||||
Reference in New Issue
Block a user