Skip to content

Commit 1bc8e5e

Browse files
authored
chore: added state text
1 parent cba4acc commit 1bc8e5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const UseEffect = () => {
1919
<code>useEffect</code>
2020
</legend>
2121

22-
<p>{state}</p>
22+
<p>state: {state}</p>
2323
<button onClick={() => setState(0)}>update state</button>
2424

2525
<p className="bad">repaint count: 2 (try to notice state flickering)</p>
@@ -55,7 +55,7 @@ const UseLayoutEffect = () => {
5555
<code>useLayoutEffect</code>
5656
</legend>
5757

58-
<p>{state}</p>
58+
<p>state: {state}</p>
5959
<button onClick={() => setState(0)}>update state</button>
6060

6161
<p className="ok">repaint count: 1</p>

0 commit comments

Comments
 (0)