DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
TypeScript Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
TypeScript
When is an explicit type argument needed for useState, rather than relying on inference from the initial value?
A
Always — useState never infers correctly
B
When the initial value's inferred type would be narrower than what the state will actually hold over time, like starting with null but expecting an object later
C
Never — explicit type arguments are always unnecessary
D
Only when using TypeScript's strict mode
Check Answer