Skip to content

Commit b77971f

Browse files
committed
completed
1 parent 56996d2 commit b77971f

File tree

7 files changed

+48
-11
lines changed

7 files changed

+48
-11
lines changed

lessons/03-rscs-without-a-framework/A-intro-to-react-server-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ We'll end up writing a whole app in Next.js by the end of the course, but we're
3636

3737
## NotePasser
3838

39-
Remember in school when you would pass notes by hand? No? Well, back in my day (_shakes fist at passing cloud_) we didn't have cell phones and had to rely penmanship and steathily trying to pass a paper note to our friend in class.
39+
Remember in school when you would pass notes by hand? No? Well, back in my day (_shakes fist at passing cloud_) we didn't have cell phones and had to rely on penmanship and steathily trying to pass a paper note to our friend in class.
4040

4141
We're going to build an app inspired by that today, where we can pass notes from one user to another.
4242

lessons/03-rscs-without-a-framework/B-rsc-dependencies.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: "RSC Dependencies"
3+
---
4+
15
There's a lot to getting this set up by hand, but bear with me, and I promsie at the end of this you're going to understand RSCs at a depth that allows you to make trade-offs of when to use them and when to avoid them.
26

37
So, first, we're going to use Webpack and Babel directly (despite normally I'd suggest Vite.) Why? Because this allows us to use the React team's code directly without a layer indirection between Vite and Webpack. In general I suggest Vite for React devs.
@@ -145,6 +149,8 @@ Looks quite similar to our previous ones. Let's make a /public/index.css. [Copy
145149

146150
Copy [this SQLite file][sqlite] to your root directory as well.
147151

152+
> Both of these files should be in the root directory of the project if you cloned it. notes.db and index.css. Put them into your project
153+
148154
Lastly add these scripts to your package.json
149155

150156
```json
@@ -158,5 +164,5 @@ Okay, this should give us everything that's needed for our app to function befor
158164

159165
Another new thing you might be the `--conditions react-server` part of running our server app. This lets Node.js know how to resolve its modules - we're in a react-server condition so only import those and know not to import client modules. I had never used this feature of Node.js before but it's pretty cool, even if it's a bit niche.
160166

161-
[css]:
162-
[sqlite]:
167+
[css]: https://raw.githubusercontent.com/btholt/irv6-project/refs/heads/main/completed/no-framework/public/index.css
168+
[sqlite]: https://github.com/btholt/irv6-project/blob/main/notes.db

lessons/05-performance-optimizations/B-the-project.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
> You will need to open the folder `perf` from the repo in your project.
2+
>
3+
> - [The starter template][starter]
4+
> - [The completed project][completed]
5+
16
Let's open the `perf` project in our repo and run `npm install`.
27

38
We're going to build a markdown previewer! On some laptops this can be pretty slow to parse and re-render to the DOM. On my laptop it's actually fast enough to get through it so we're going to introduce some artifical jank. Your computer may not need it.
@@ -89,3 +94,5 @@ Alright, go play with it now (you may need to mess with the JANK_DELAY as well a
8994
So how can we fix at least the scroll portion, as well make the other two a little less painful (as they'll only re-renderingo once as opposed to continually.)
9095

9196
[xss]: https://owasp.org/www-community/attacks/xss/
97+
[starter]: https://github.com/btholt/irv6-project/tree/main/starter/perf
98+
[completed]: https://github.com/btholt/irv6-project/tree/main/completed/perf
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
We're making a little scoreboard project, let's familiar ourselves with it.
1+
> You will need to open the folder `transitions` from the repo in your project.
2+
>
3+
> - [The starter template][starter]
4+
> - [The completed project][completed]
25
3-
[Start with the transitions][folder]. The complete solution is in the [transitions-complete][complete] folder if you need to reference it.
6+
We're making a little scoreboard project, let's familiar ourselves with it.
47

58
- Run `npm install`
69
- It's a plain ol' Vite project. No server side anything. You can do transitions with servers, we just don't need to.
@@ -9,5 +12,5 @@ We're making a little scoreboard project, let's familiar ourselves with it.
912
- Vite will proxy the Node.js server from port 3000 to port 5173 so you can call localhost:5173/score?game=1 - all same origin
1013
- Everything else is a pretty standard React project.
1114

12-
[folder]:
13-
[complete]:
15+
[starter]: https://github.com/btholt/irv6-project/tree/main/starter/transitions
16+
[completed]: https://github.com/btholt/irv6-project/tree/main/completed/transitions

lessons/07-optimistic-values/B-the-project.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
> You will need to open the folder `optimistic` from the repo in your project.
2+
>
3+
> - [The starter template][starter]
4+
> - [The completed project][completed]
5+
16
Let's open the project.
27

38
1. Open optimisitic folder in your editor of choice
@@ -76,3 +81,6 @@ export default function App() {
7681
- The big issue here is that the user is shown no feedback while the POST happening.
7782
- We could just append to thoughts and hope for the best - and this is what we used to do.
7883
- However we can use `useOptimisticState` and get a lot of the error cases and other problems wrapped up and taken care of for us.
84+
85+
[starter]: https://github.com/btholt/irv6-project/tree/main/starter/optimistic
86+
[completed]: https://github.com/btholt/irv6-project/tree/main/completed/optimistic

lessons/08-deferred-values/B-the-project.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
Open the `deferred` project from our repo.
1+
> You will need to open the folder `deferred` from the repo in your project.
2+
>
3+
> - [The starter template][starter]
4+
> - [The completed project][completed]
25
36
Let's hop into our src directory and create a Slider.jsx file.
47

@@ -130,3 +133,6 @@ export default function App() {
130133

131134
- Now we can see something rendered. Notice it's _super_ janky.
132135
- You'll notice that DisplayImage is re-rendering 100% of the time. This is because we haven't memoized it and also filterStyle is changing every time a slider is. When props change, a component will always re-render, memoized or not.
136+
137+
[starter]: https://github.com/btholt/irv6-project/tree/main/starter/deferred
138+
[completed]: https://github.com/btholt/irv6-project/tree/main/completed/deferred

styles/courses.css

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ a {
4040
}
4141

4242
.navbar {
43-
border-bottom: 1px solid #ccc;
43+
border-bottom: 2px solid var(--icons);
4444
position: fixed;
4545
width: 100%;
4646
top: 0;
@@ -90,7 +90,7 @@ header .cta-btn {
9090
.cta-btn {
9191
border-radius: 10px;
9292
background: var(--nav-buttons);
93-
color: var(--nav-buttons-text);
93+
color: black;
9494
padding: 7px 20px;
9595
display: flex;
9696
justify-content: center;
@@ -340,6 +340,10 @@ blockquote > *:last-child {
340340
margin-bottom: 0;
341341
}
342342

343+
blockquote > *:first-child {
344+
margin-top: 0;
345+
}
346+
343347
.lesson-content img {
344348
max-width: 100%;
345349
}
@@ -424,6 +428,8 @@ ol.sections-name .lesson-details {
424428
flex: 1;
425429
background: var(--bg-lesson);
426430
position: relative;
431+
border: 2px solid var(--icons);
432+
border-radius: 4px;
427433
}
428434

429435
.details-bg {
@@ -491,7 +497,7 @@ ol.sections-name .lesson-details {
491497
.lesson-links a {
492498
border-radius: 10px;
493499
background: var(--nav-buttons);
494-
color: var(--nav-buttons-text);
500+
color: black;
495501
padding: 15px 20px;
496502
display: inline-block;
497503
display: flex;
@@ -511,6 +517,7 @@ ol.sections-name .lesson-details {
511517
.lesson-links a:hover {
512518
background: #152837;
513519
text-decoration: none;
520+
color: var(--icons);
514521
}
515522

516523
.lesson-links .arrow {

0 commit comments

Comments
 (0)