Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52e5caf

Browse files
committed
next
1 parent0db8443 commit52e5caf

File tree

64 files changed

+27170
-971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+27170
-971
lines changed

‎.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TSC_COMPILE_ON_ERROR=true

‎LIVE_INSTRUCTION.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#Advanced React Hooks
2+
3+
>Memoization, Context, Layout. Oh My! 😱
4+
5+
👋 I'm Kent C. Dodds
6+
7+
- 🏡 Utah
8+
- 👩 👧 👦 👦 👦 🐕
9+
- 🐨 kentcdodds.com
10+
- 🐦/🐙@kentcdodds
11+
- 🚀 EpicReact.dev
12+
- 🏆 testingjavascript.com
13+
- 🥚 kcd.im/egghead
14+
- 💌 kcd.im/news
15+
- 📝 kcd.im/blog
16+
- 📽 kcd.im/youtube
17+
18+
#What this workshop is
19+
20+
- Lots of exercises
21+
22+
#What this workshop is not
23+
24+
- Solo
25+
- Lecture
26+
27+
#Logistics
28+
29+
##Schedule
30+
31+
- 😴 Logistics
32+
- 🏋 01. useReducer: simple Counter
33+
- 😴 10 Minutes
34+
- 🏋 02. useCallback: custom hooks
35+
- 😴 60 Minutes
36+
- 🏋 03. useContext: simple Counter
37+
- 🏋 04. useLayoutEffect: auto-scrolling textarea
38+
- 😴 10 Minutes
39+
- 🏋 05. useImperativeHandle: scroll to top/bottom
40+
- 🏋 06. useDebugValue: useMedia
41+
- ❓ Q&A
42+
43+
##Asking Questions
44+
45+
Please do ask! Interrupt me. If you have an unrelated question, you can ask me
46+
via:
47+
48+
1.[Office Hours](https://kcd.im/office-hours)
49+
2.[The Call Kent Podcast](https://kentcdodds.com/calls)
50+
51+
##Zoom
52+
53+
- Help us make this more human by keeping your video on if possible
54+
- Keep microphone muted unless speaking
55+
- Breakout rooms
56+
57+
##Review the README...

‎README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,41 +128,55 @@ however _sometimes_ you can accomplish the task and the tests still fail if you
128128
implement things differently than I do in my solution, so don't look to them as
129129
a complete authority.
130130

131+
##TypeScript
132+
133+
You can go through this workshop with TypeScript or JavaScript. All the files
134+
are TypeScript files, but if you run the script in`./scripts/remove-ts` then
135+
all the files will be renamed and all the TypeScript typing code will be
136+
removed.
137+
138+
If you have experience with TypeScript then I suggest you go through the
139+
workshop material with TypeScript. However, if you don't have experience with
140+
TypeScript, I strongly advise you remove the TypeScript. It's very difficult to
141+
learn two things at once and you'll likely find yourself frustrated.
142+
131143
###Exercises
132144

133145
-`src/exercise/00.md`: Background, Exercise Instructions, Extra Credit
134-
-`src/exercise/00.js`: Exercise with Emoji helpers
135-
-`src/__tests__/00.js`: Tests
136-
-`src/final/00.js`: Final version
137-
-`src/final/00.extra-0.js`: Final version of extra credit
146+
-`src/exercise/00.tsx`: Exercise with Emoji helpers
147+
-`src/__tests__/00.tsx`: Tests
148+
-`src/final/00.tsx`: Final version
149+
-`src/final/00.extra-0.tsx`: Final version of extra credit
138150

139151
The purpose of the exercise is**not** for you to work through all the material.
140152
It's intended to get your brain thinking about the right questions to ask me as
141153
_I_ walk through the material.
142154

143-
###Helpful Emoji 🐨 💰 💯 📝 🦉 📜 💣 💪 🏁 👨‍💼 🚨
155+
###Helpful Emoji 🐨🦺💰 💯 📝 🦉 📜 💣 💪 🏁 👨‍💼 🚨
144156

145157
Each exercise has comments in it to help you get through the exercise. These fun
146158
emoji characters are here to help you.
147159

148160
-**Kody the Koala** 🐨 will tell you when there's something specific you should
149161
do
162+
-**Lily the Life Jacket** 🦺 will help you with any TypeScript-specific parts
163+
of the exercises
150164
-**Marty the Money Bag** 💰 will give you specific tips (and sometimes code)
151165
along the way
152166
-**Hannah the Hundred** 💯 will give you extra challenges you can do if you
153-
finish the exercises early.
167+
finish the exercises early
154168
-**Nancy the Notepad** 📝 will encourage you to take notes on what you're
155169
learning
156170
-**Olivia the Owl** 🦉 will give you useful tidbits/best practice notes and a
157-
link for elaboration and feedback.
171+
link for elaboration and feedback
158172
-**Dominic the Document** 📜 will give you links to useful documentation
159173
-**Berry the Bomb** 💣 will be hanging around anywhere you need to blow stuff
160174
up (delete code)
161175
-**Matthew the Muscle** 💪 will indicate that you're working with an exercise
162176
-**Chuck the Checkered Flag** 🏁 will indicate that you're working with a final
163177
-**Peter the Product Manager** 👨‍💼 helps us know what our users want
164178
-**Alfred the Alert** 🚨 will occasionally show up in the test failures with
165-
potential explanations for why the tests are failing.
179+
potential explanations for why the tests are failing
166180

167181
##Contributors
168182

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js b/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js
2+
index 949f34a..0b3b54e 100644
3+
--- a/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js
4+
+++ b/node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js
5+
@@ -58,6 +58,7 @@ function verifyNoTypeScript() {
6+
}
7+
8+
function verifyTypeScriptSetup() {
9+
+ return
10+
let firstTimeSetup = false;
11+
12+
if (!fs.existsSync(paths.appTsConfig)) {

‎config/tsconfig.exercise.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends":"./tsconfig.shared.json",
3+
"include": ["../src/exercise/"],
4+
"compilerOptions": {
5+
"strict":false
6+
}
7+
}

‎config/tsconfig.final.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends":"./tsconfig.shared.json",
3+
"exclude": ["../src/exercise/"],
4+
"include": ["../src"],
5+
"compilerOptions": {
6+
"strict":true,
7+
"noUncheckedIndexedAccess":true
8+
}
9+
}

‎config/tsconfig.shared.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"target":"es5",
4+
"lib": ["dom","dom.iterable","esnext"],
5+
"allowJs":true,
6+
"skipLibCheck":true,
7+
"esModuleInterop":true,
8+
"allowSyntheticDefaultImports":true,
9+
"strict":false,
10+
"forceConsistentCasingInFileNames":true,
11+
"module":"esnext",
12+
"moduleResolution":"node",
13+
"resolveJsonModule":true,
14+
"isolatedModules":true,
15+
"noEmit":true,
16+
"jsx":"react-jsx",
17+
"noFallthroughCasesInSwitch":true
18+
}
19+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp