Video Transcript

Transcript
12:31
So whenever you see a generic constraint like `T extends`, ask yourself what the caller will pass.
12:42
This pattern prevents us from widening the type back to unknown.
12:58
What happens if we omit the constraint entirely?
About this piece

Video Transcript

Timestamped transcript panel where the currently-playing line picks up a sky background highlight.

Usage

The import and the props worth knowing about, in one place.

import { Education20 } from "@/components/beste/piece/education20";

<Education20
  lesson="Transcript"
  lines={[
    {
      "timestamp": "12:31",
      "text": "So whenever you see a generic constraint like `T extends`, ask yourself what the caller will pass."
    },
    {
      "timestamp": "12:42",
      "text": "This pattern prevents us from widening the type back to unknown.",
      "active": true
    },
    {
      "timestamp": "12:58",
      "text": "What happens if we omit the constraint entirely?"
    }
  ]}
  bordered={false}
/>

More Education pieces

View all Education
Lesson 6
useEffect runs after the DOM commit, not during render.Cleanup runs before the next effect, and on unmount.
Ask Priya about the stale-closure example in office hours.
Composing tokens with Tailwind18 min
Hania Rani
Hania Rani
Resolved

In lesson 6, the dependency array skips the `setCount` setter. Isn't it a stale closure risk?

4 replies
Refactoring a big list lesson
12:48
Refactoring a big list into virtualized rows
Full-stack TypeScript
Students12,480
Rating4.8
UpdatedLast week
Memoizing expensive renders7 min left