Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit d8120cf

Browse files
Robert BiggsRobert Biggs
Robert Biggs
authored and
Robert Biggs
committed
Update
1 parent 2c2710e commit d8120cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tuts/state-n-lifecycle.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ <h2>Adding Lifecycle Methods to a Class</h2>
148148

149149
<p data-height="300" data-theme-id="6688" data-slug-hash="xPbOgq" data-default-tab="js,result" data-user="rbiggs" data-embed-version="2" data-pen-title="Composi Tuts -State and Lifecycle-2" class="codepen">See the Pen <a href="https://codepen.io/rbiggs/pen/xPbOgq/">Composi Tuts -State and Lifecycle-2</a> by Robert Biggs (<a href="https://codepen.io/rbiggs">@rbiggs</a>) on <a href="https://codepen.io">CodePen</a>.</p>
150150
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
151-
<p>With the lifecycle hooks setup, instanciating a new instance of the clock will cause the loop to kick in, resulting in a clock that updates itself automatically. Using class components with state is a more efficient way of creating component with encapsulated behaviors.</p>
151+
<p>With the lifecycle hooks setup, instantiating a new instance of the clock will cause the loop to kick in, resulting in a clock that updates itself automatically. Using class components with state is a more efficient way of creating component with encapsulated behaviors.</p>
152152

153153
<h2>Using State Correctly</h2>
154154
<p>Although you can in some cases change state directly, it's always better to use <code>setState</code> to do so. When state is a primitive type, such as string, number or boolean, it is possible to set the state directly through assignment:</p>

0 commit comments

Comments
 (0)