Deploy website

Deploy website version based on 0bd4a44865
This commit is contained in:
Website Deployment Script
2018-02-08 17:40:37 +00:00
parent 0bd4a44865
commit 884e242922
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -171,7 +171,7 @@ render() {
></div></div></div><h2><a class="anchor" aria-hidden="true" name="avoiding-conflicts-with-the-render-function"></a><a href="#avoiding-conflicts-with-the-render-function" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Avoiding conflicts with the render function</h2>
<p>If you update a property that is also managed by the render function, you might end up with some unpredictable and confusing bugs because anytime the component re-renders and that property changes, whatever value was previously set from <code>setNativeProps</code> will be completely ignored and overridden.</p>
<h2><a class="anchor" aria-hidden="true" name="setnativeprops-shouldcomponentupdate"></a><a href="#setnativeprops-shouldcomponentupdate" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>setNativeProps &amp; shouldComponentUpdate</h2>
<p>By <a href="https://facebook.github.io/react/advanced-performance.md#avoiding-reconciling-the-dom">intelligently applying <code>shouldComponentUpdate</code></a> you can avoid the unnecessary overhead involved in reconciling unchanged component subtrees, to the point where it may be performant enough to use <code>setState</code> instead of <code>setNativeProps</code>.</p>
<p>By <a href="https://reactjs.org/docs/optimizing-performance.html#avoid-reconciliation">intelligently applying <code>shouldComponentUpdate</code></a> you can avoid the unnecessary overhead involved in reconciling unchanged component subtrees, to the point where it may be performant enough to use <code>setState</code> instead of <code>setNativeProps</code>.</p>
<h2><a class="anchor" aria-hidden="true" name="other-native-methods"></a><a href="#other-native-methods" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Other native methods</h2>
<p>The methods described here are available on most of the default components provided by React Native. Note, however, that they are <em>not</em> available on composite components that aren't directly backed by a native view. This will generally include most components that you define in your own app.</p>
<h3><a class="anchor" aria-hidden="true" name="measurecallback"></a><a href="#measurecallback" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>measure(callback)</h3>
+5 -2
View File
@@ -206,7 +206,10 @@ emulator-<span class="hljs-number">5554</span> offline <span class="hljs-comme
<p>You can use this method if your device is running Android 5.0 (Lollipop) or newer, it has USB debugging enabled, and it is connected via USB to your development machine.</p>
<p><block class="mac windows linux android" /></p>
<p>Run the following in a command prompt:</p>
<pre><code class="hljs">$ adb reverse <span class="hljs-built_in">t</span><span class="hljs-symbol">cp:8081</span> <span class="hljs-built_in">t</span><span class="hljs-symbol">cp:8081</span>
<pre><code class="hljs">$ adb -s &lt;device <span class="hljs-built_in">name</span>&gt; <span class="hljs-built_in">reverse</span> tcp:<span class="hljs-number">8081</span> tcp:<span class="hljs-number">8081</span>
</code></pre>
<p>To find the device name, run the following adb command:</p>
<pre><code class="hljs"><span class="hljs-meta">$</span><span class="bash"> adb devices</span>
</code></pre>
<p>You can now enable Live reloading from the <a href="/react-native/docs/next/debugging.html#accessing-the-in-app-developer-menu">Developer menu</a>. Your app will reload whenever your JavaScript code has changed.</p>
<h3><a class="anchor" aria-hidden="true" name="method-2-connect-via-wi-fi"></a><a href="#method-2-connect-via-wi-fi" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Method 2: Connect via Wi-Fi</h3>
@@ -223,7 +226,7 @@ emulator-<span class="hljs-number">5554</span> offline <span class="hljs-comme
<li>Open your React Native app on your device.</li>
<li>You'll see a <a href="/react-native/docs/next/debugging.html#in-app-errors-and-warnings">red screen with an error</a>. This is OK. The following steps will fix that.</li>
<li>Open the in-app <a href="/react-native/docs/next/debugging.html#accessing-the-in-app-developer-menu">Developer menu</a>.</li>
<li>Go to <strong>Dev Settings</strong> → <strong>Debug server host for device</strong>.</li>
<li>Go to <strong>Dev Settings</strong> → <strong>Debug server host &amp; port for device</strong>.</li>
<li>Type in your machine's IP address and the port of the local dev server (e.g. 10.0.1.1:8081).</li>
<li>Go back to the <strong>Developer menu</strong> and select <strong>Reload JS</strong>.</li>
</ol>