Deploy website

Deploy website version based on 77ad7d4e861b2cacc959494c3ba7d2c98f9c0f2c
This commit is contained in:
Website Deployment Script
2020-01-30 16:33:24 +00:00
parent 2120a87b71
commit 142ef8e0fc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -502,7 +502,7 @@ export default function Cafe() {
<span class="token operator">/</span><span class="token operator">></span>
</code></pre>
<blockquote>
<p>You mightve noticed that although <code>isHungry</code> is a <a href="https://developer.mozilla.org/Web/JavaScript/Reference/Statements/const">const</a>, it is seemingly reassignable! What is happening is when a state-setting function like <code>setIsHungry</code> is called, its component will re-render. In this case <code>Cat</code> will re-render its <code>&lt;Cat&gt;</code>—discarding the old <code>isHungry</code> and running <code>setState</code> again with the new value in the process!</p>
<p>You mightve noticed that although <code>isHungry</code> is a <a href="https://developer.mozilla.org/Web/JavaScript/Reference/Statements/const">const</a>, it is seemingly reassignable! What is happening is when a state-setting function like <code>setIsHungry</code> is called, its component will re-render. In this case the <code>Cat</code> function will run again—and this time, <code>useState</code> will give us the next value of <code>isHungry</code>.</p>
</blockquote>
<p>Finally, put your cats inside a <code>Cafe</code> component:</p>
<pre><code class="hljs css language-jsx"><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token keyword">function</span> <span class="token function">Cafe</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
+1 -1
View File
@@ -502,7 +502,7 @@ export default function Cafe() {
<span class="token operator">/</span><span class="token operator">></span>
</code></pre>
<blockquote>
<p>You mightve noticed that although <code>isHungry</code> is a <a href="https://developer.mozilla.org/Web/JavaScript/Reference/Statements/const">const</a>, it is seemingly reassignable! What is happening is when a state-setting function like <code>setIsHungry</code> is called, its component will re-render. In this case <code>Cat</code> will re-render its <code>&lt;Cat&gt;</code>—discarding the old <code>isHungry</code> and running <code>setState</code> again with the new value in the process!</p>
<p>You mightve noticed that although <code>isHungry</code> is a <a href="https://developer.mozilla.org/Web/JavaScript/Reference/Statements/const">const</a>, it is seemingly reassignable! What is happening is when a state-setting function like <code>setIsHungry</code> is called, its component will re-render. In this case the <code>Cat</code> function will run again—and this time, <code>useState</code> will give us the next value of <code>isHungry</code>.</p>
</blockquote>
<p>Finally, put your cats inside a <code>Cafe</code> component:</p>
<pre><code class="hljs css language-jsx"><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token keyword">function</span> <span class="token function">Cafe</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>