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...
JavaScript Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
JavaScript
Why can't a useEffect callback be an async function directly?
A
React doesn't support promises at all
B
useEffect expects its callback to return either nothing or a cleanup function; an async function instead returns a Promise, which React can't use as a cleanup function
C
async functions run too slowly for effects
D
It actually CAN be async — this is a myth
Check Answer