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:
@@ -35,8 +35,9 @@ will use to identify each scene to render. <code>initialRoute</code> must be
|
||||
a route in the <code>initialRouteStack</code> if both props are provided. The
|
||||
<code>initialRoute</code> will default to the last item in the <code>initialRouteStack</code>.</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="initialroutestack"></a>initialRouteStack <span class="propType"><span>[object]</span></span> <a class="hash-link" href="docs/navigator.html#initialroutestack">#</a></h4><div><p>Provide a set of routes to initially mount. Required if no initialRoute
|
||||
is provided. Otherwise, it will default to an array containing only the
|
||||
<code>initialRoute</code></p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="navigationbar"></a>navigationBar <span class="propType">node</span> <a class="hash-link" href="docs/navigator.html#navigationbar">#</a></h4><div><p>Optionally provide a navigation bar that persists across scene
|
||||
transitions</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="navigator"></a>navigator <span class="propType">object</span> <a class="hash-link" href="docs/navigator.html#navigator">#</a></h4><div><p>Optionally provide the navigator object from a parent Navigator</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="ondidfocus"></a>onDidFocus <span class="propType">function</span> <a class="hash-link" href="docs/navigator.html#ondidfocus">#</a></h4><div><p>Will be called with the new route of each scene after the transition is
|
||||
<code>initialRoute</code></p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="navigationbar"></a>navigationBar <span class="propType">node</span> <a class="hash-link" href="docs/navigator.html#navigationbar">#</a></h4><div><p>Optionally provide a component as navigation bar that persists across scene
|
||||
transitions. The component will receive two props: <code>navigator</code> and <code>navState</code>.
|
||||
It will be rerendered when the routes change.</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="navigator"></a>navigator <span class="propType">object</span> <a class="hash-link" href="docs/navigator.html#navigator">#</a></h4><div><p>Optionally provide the navigator object from a parent Navigator</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="ondidfocus"></a>onDidFocus <span class="propType">function</span> <a class="hash-link" href="docs/navigator.html#ondidfocus">#</a></h4><div><p>Will be called with the new route of each scene after the transition is
|
||||
complete or after the initial mounting</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onwillfocus"></a>onWillFocus <span class="propType">function</span> <a class="hash-link" href="docs/navigator.html#onwillfocus">#</a></h4><div><p>Will emit the target route upon mounting and before each nav transition</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="renderscene"></a>renderScene <span class="propType">function</span> <a class="hash-link" href="docs/navigator.html#renderscene">#</a></h4><div><p>Required function which renders the scene for a given route. Will be
|
||||
invoked with the route and the navigator object</p><div class="prism language-javascript"><span class="token punctuation">(</span>route<span class="token punctuation">,</span> navigator<span class="token punctuation">)</span> <span class="token operator">=</span><span class="token operator">></span>
|
||||
<MySceneComponent title<span class="token operator">=</span><span class="token punctuation">{</span>route<span class="token punctuation">.</span>title<span class="token punctuation">}</span> navigator<span class="token operator">=</span><span class="token punctuation">{</span>navigator<span class="token punctuation">}</span> <span class="token operator">/</span><span class="token operator">></span></div></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="scenestyle"></a>sceneStyle <span class="propType"><a href="docs/view.html#style">View#style</a></span> <a class="hash-link" href="docs/navigator.html#scenestyle">#</a></h4><div><p>Styles to apply to the container of each scene</p></div></div></div></div><div class="docs-prevnext"><a class="docs-next" href="docs/navigatorios.html#content">Next →</a></div></div><noscript></noscript></section><footer class="wrap"><div class="center">© 2016 Facebook Inc.</div></footer></div><div id="fb-root"></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
|
||||
|
||||
Reference in New Issue
Block a user