TypeScript for Beginners·Lesson 5 Quiz
Quiz: TypeScript with React
Test what you learned in this lesson before moving on.
Lesson Quiz
Pass with 80% to complete this lesson.
1. What type should you use for a component prop that accepts any renderable React content?
2. How do you type a `useState` hook that starts as `null` but will later hold a `User` object?
3. What is the correct event type for an `onChange` handler on an `<input>` element?
4. Why create a custom `useAuth()` hook that throws if the context is null?