update website

This commit is contained in:
Travis CI
2015-11-14 19:38:27 +00:00
parent 5600f5cbe8
commit 8752e2b035
+1 -2
View File
@@ -14,8 +14,7 @@ Pasteboard
PushNotificationIOS
Alert</div><h3><a class="anchor" name="some-props-are-only-supported-on-one-platform"></a>Some props are only supported on one platform <a class="hash-link" href="#some-props-are-only-supported-on-one-platform">#</a></h3><p>There are properties that work on one platform only, either because they can inherently only be supported on that platform or because they haven&#x27;t been implemented on the other platforms yet. All of these are annotated with <code>@platform</code> in JS docs and have a small badge next to them on the website. See e.g. <a href="https://facebook.github.io/react-native/docs/image.html" target="_blank">Image</a>.</p><h3><a class="anchor" name="platform-parity"></a>Platform parity <a class="hash-link" href="#platform-parity">#</a></h3><p>There are known cases where the APIs could be made more consistent across iOS and Android:</p><ul><li><code>&lt;SwitchAndroid&gt;</code> and <code>&lt;SwitchIOS&gt;</code> are very similar and should be unified to a single <code>&lt;Switch&gt;</code> component.</li><li><code>&lt;AndroidViewPager&gt;</code> (to be open sourced soon) and <code>&lt;ScrollView pagingEnabled={true}&gt;</code> on iOS do a similar thing. We might want to unify them to <code>&lt;ViewPager&gt;</code>.</li><li><code>alert()</code> needs Android support (once the Dialogs module is open sourced)</li><li>It might be possible to bring <code>LinkingIOS</code> and <code>IntentAndroid</code> (to be open sourced) closer together.</li><li><code>ActivityIndicator</code> could render a native spinning indicator on both platforms (currently this is done using <code>ActivityIndicatorIOS</code> on iOS and <code>ProgressBarAndroid</code> on Android).</li><li><code>ProgressBar</code> could render a horizontal progress bar on both platforms (currently only supported on iOS via <code>ProgressViewIOS</code>).</li></ul><h3><a class="anchor" name="publishing-modules-on-android"></a>Publishing modules on Android <a class="hash-link" href="#publishing-modules-on-android">#</a></h3><p>There is currently no easy way of publishing custom native modules on Android. Smooth work flow for contributors is important and this will be looked at very closely after the initial Open Source release. Of course the aim will be to streamline and optimize the process between iOS and Android as much as possible.</p><h3><a class="anchor" name="the-overflow-style-property-defaults-to-hidden-and-cannot-be-changed-on-android"></a>The <code>overflow</code> style property defaults to <code>hidden</code> and cannot be changed on Android <a class="hash-link" href="#the-overflow-style-property-defaults-to-hidden-and-cannot-be-changed-on-android">#</a></h3><p>This is a result of how Android rendering works. This feature is not being worked on as it would be a significant undertaking and there are many more important tasks.</p><h3><a class="anchor" name="no-support-for-shadows-on-android"></a>No support for shadows on Android <a class="hash-link" href="#no-support-for-shadows-on-android">#</a></h3><p>We don&#x27;t support shadows on Android currently. These are notoriously hard to implement as they require drawing outside of a view&#x27;s bounds and Android&#x27;s invalidation logic has a hard time with that. A possible solution is to use <a href="https://developer.android.com/training/material/shadows-clipping.html" target="_blank">elevation</a>, but more experimentation will be required.</p><h3><a class="anchor" name="layout-only-nodes-on-android"></a>Layout-only nodes on Android <a class="hash-link" href="#layout-only-nodes-on-android">#</a></h3><p>An optimization feature of the Android version of React Native is for views which only contribute to the layout to not have a native view, only their layout properties are propagated to their children views. This optimization is to provide stability in deep view hierarchies for React Native and is therefore enabled by default. Should you depend on a view being present or internal tests incorrectly detect a view is layout only it will be necessary to turn off this behavior. To do this, set <code>collapsable</code> to false as in this example:</p><div class="prism language-javascript">&lt;View collapsable<span class="token operator">=</span><span class="token punctuation">{</span><span class="token boolean">false</span><span class="token punctuation">}</span><span class="token operator">&gt;</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
&lt;<span class="token operator">/</span>View<span class="token operator">&gt;</span></div><h3><a class="anchor" name="memory-issues-with-png-images"></a>Memory issues with PNG images <a class="hash-link" href="#memory-issues-with-png-images">#</a></h3><p>React Native Android depends on <a href="https://github.com/facebook/fresco" target="_blank">Fresco</a> for loading and displaying images. Currently we have disabled downsampling because it is experimental, so you may run into memory issues when loading large PNG images.</p><h3><a class="anchor" name="react-native-init-hangs"></a>react-native init hangs <a class="hash-link" href="#react-native-init-hangs">#</a></h3><p>Try running <code>react-native init</code> with <code>--verbose</code> and see <a href="https://github.com/facebook/react-native/issues/2797" target="_blank">#2797</a> for common causes.</p><h3><a class="anchor" name="text-input-border"></a>Text Input Border <a class="hash-link" href="#text-input-border">#</a></h3><p>The text input has by default a border at the bottom of its view. This border has its padding set by the background image provided by the system, and it cannot be changed. Solutions to avoid this is to either not set height explicitly, case in which the system will take care of displaying the border in the correct position, or to not display the border by setting underlineColor to transparent.</p><h3><a class="anchor" name="firebase-throws-no-transports-available"></a>Firebase throws &#x27;No transports available&#x27; <a class="hash-link" href="#firebase-throws-no-transports-available">#</a></h3><p>Make sure you require React Native before requiring Firebase. This way React Native has a chance to set up the <code>WebSocket</code> polyfill:</p><div class="prism language-javascript"><span class="token keyword">var</span> React <span class="token operator">=</span> <span class="token function">require<span class="token punctuation">(</span></span><span class="token string">&#x27;react-native&#x27;</span><span class="token punctuation">)</span>
<span class="token keyword">var</span> Firebase <span class="token operator">=</span> <span class="token function">require<span class="token punctuation">(</span></span><span class="token string">&#x27;firebase&#x27;</span><span class="token punctuation">)</span><span class="token punctuation">;</span></div><p>Discovered thanks to issue <a href="https://github.com/facebook/react-native/issues/3645" target="_blank">#3645</a>. If you&#x27;re curious, the polyfills are set up in <a href="https://github.com/facebook/react-native/blob/master/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js" target="_blank">InitializeJavaScriptAppEngine.js</a>.</p></div><div class="docs-prevnext"><a class="docs-next" href="performance.html#content">Next →</a></div></div></section><footer class="wrap"><div class="center">© 2015 Facebook Inc.</div></footer></div><div id="fb-root"></div><script>
&lt;<span class="token operator">/</span>View<span class="token operator">&gt;</span></div><h3><a class="anchor" name="memory-issues-with-png-images"></a>Memory issues with PNG images <a class="hash-link" href="#memory-issues-with-png-images">#</a></h3><p>React Native Android depends on <a href="https://github.com/facebook/fresco" target="_blank">Fresco</a> for loading and displaying images. Currently we have disabled downsampling because it is experimental, so you may run into memory issues when loading large PNG images.</p><h3><a class="anchor" name="react-native-init-hangs"></a>react-native init hangs <a class="hash-link" href="#react-native-init-hangs">#</a></h3><p>Try running <code>react-native init</code> with <code>--verbose</code> and see <a href="https://github.com/facebook/react-native/issues/2797" target="_blank">#2797</a> for common causes.</p><h3><a class="anchor" name="text-input-border"></a>Text Input Border <a class="hash-link" href="#text-input-border">#</a></h3><p>The text input has by default a border at the bottom of its view. This border has its padding set by the background image provided by the system, and it cannot be changed. Solutions to avoid this is to either not set height explicitly, case in which the system will take care of displaying the border in the correct position, or to not display the border by setting underlineColor to transparent.</p></div><div class="docs-prevnext"><a class="docs-next" href="performance.html#content">Next →</a></div></div></section><footer class="wrap"><div class="center">© 2015 Facebook Inc.</div></footer></div><div id="fb-root"></div><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)