Skip to content

Commit 33d8edd

Browse files
committed
add videos!
1 parent 39fc87d commit 33d8edd

File tree

27 files changed

+445
-80
lines changed

27 files changed

+445
-80
lines changed

epicshop/package-lock.json

Lines changed: 393 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

epicshop/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"type": "module",
33
"dependencies": {
4-
"@epic-web/workshop-app": "^4.12.4",
5-
"@epic-web/workshop-utils": "^4.12.4",
4+
"@epic-web/workshop-app": "^4.12.5",
5+
"@epic-web/workshop-utils": "^4.12.5",
66
"chokidar": "^3.6.0",
77
"execa": "^9.3.0",
88
"fs-extra": "^11.2.0"

exercises/01.use-state/01.problem.initial-state/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Initial State
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/render-an-initial-state" />
4+
35
👨‍💼 Hello! So here's where we're starting out:
46

57
```tsx
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Initial State
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/render-an-initial-state/solution" />
4+
35
👨‍💼 Great work! Now at least we're not just throwing an error. But let's handle
46
the state update next.

exercises/01.use-state/02.problem.update-state/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Update State
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/make-the-setstate-function-work" />
4+
35
👨‍💼 Alright, right now when you click the button, nothing happens. Let's get it
46
to update the state.
57

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Update State
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/make-the-setstate-function-work/solution" />
4+
35
👨‍💼 So we're updating the state value, but it's not actually updating the number
46
in the button? What gives?!

exercises/01.use-state/03.problem.re-render/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Re-render
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/component-doesn-t-re-render-when-state-updates" />
4+
35
👨‍💼 Ok, so we're initializing our state properly and we're updating the state
46
properly as well. The problem is we're not updating the UI when the state gets
57
updated. Remember, we're not React. We need to tell React when the state has
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Re-render
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/component-doesn-t-re-render-when-state-updates/solution" />
4+
35
👨‍💼 Great work! Now we're not only updating the state, but we're also triggering
46
a re-render so the UI can be updated. Unfortunately that seems to not be working
57
either? Let's figure out why.

exercises/01.use-state/04.problem.preserve-state/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Preserve State
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/state-is-reset-to-initialstate-on-each-render" />
4+
35
👨‍💼 Alright, so there are actually two problems here. First, when the user clicks
46
on the button, we update the `state` variable inside the `useState` closure, but
57
that variable is not accessible by our component. Our component has its own
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Preserve State
22

3+
<EpicVideo url="https://www.epicreact.dev/tutorials/build-react-hooks/use-state/state-is-reset-to-initialstate-on-each-render/solution" />
4+
35
👨‍💼 Great work! Our UI is working properly! By preserving our state we're able to
46
make changes to it and render again whenever that value changes.

0 commit comments

Comments
 (0)