Skip to content

Commit ac676ec

Browse files
author
Ives van Hoorne
committed
Force refresh for first 3 embeds because of setInterval
1 parent f25dc72 commit ac676ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: content/docs/state-and-lifecycle.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ So far we have only learned one way to update the UI.
1313

1414
We call `ReactDOM.render()` to change the rendered output:
1515

16-
[Run example.](source:examples/single-file-examples/src/state-and-lifecycle/state-and-lifecycle-1.js{11}?editorsize=70)
16+
[Run example.](source:examples/single-file-examples/src/state-and-lifecycle/state-and-lifecycle-1.js{11}?editorsize=70&forcerefresh=1)
1717

1818
In this section, we will learn how to make the `Clock` component truly reusable and encapsulated. It will set up its own timer and update itself every second.
1919

2020
We can start by encapsulating how the clock looks:
2121

22-
[Run example.](source:examples/single-file-examples/src/state-and-lifecycle/state-and-lifecycle-2.js{6,7,8,9,14}?editorsize=70)
22+
[Run example.](source:examples/single-file-examples/src/state-and-lifecycle/state-and-lifecycle-2.js{6,7,8,9,14}?editorsize=70&forcerefresh=1)
2323

2424
However, it misses a crucial requirement: the fact that the `Clock` sets up a timer and updates the UI every second should be an implementation detail of the `Clock`.
2525

@@ -52,7 +52,7 @@ You can convert a functional component like `Clock` to a class in five steps:
5252

5353
5. Delete the remaining empty function declaration.
5454

55-
[Run example.](source:examples/single-file-examples/src/state-and-lifecycle/state-and-lifecycle-3.js?editorsize=70)
55+
[Run example.](source:examples/single-file-examples/src/state-and-lifecycle/state-and-lifecycle-3.js?editorsize=70&forcerefresh=1)
5656

5757
`Clock` is now defined as a class rather than a function.
5858

0 commit comments

Comments
 (0)