Prompt
Schedule a local notification using expo-notifications that fires 5 seconds after a button press. The notification should have a title "Reminder" and body "Time's up!".
Solution
The point of scheduleNotificationAsync is who fires it: the notification is registered with the operating system's scheduler, so it fires on time even if the app is backgrounded or killed. That's the fundamental split from anything JS-side — a setTimeout lives in the JS runtime and dies with it. Local notifications are the OS outliving your process.
The API separates content (title, body, data payload, sound) from trigger (when), and the trigger vocabulary is worth knowing beyond { seconds: 5 }: calendar triggers for "9am daily," date triggers for absolute times, and null to present immediately. Two production prerequisites the challenge elides: notification permission must be requested first (iOS always prompts; Android 13+ made POST_NOTIFICATIONS a runtime permission), and by default iOS won't show a banner while your app is foregrounded — you opt in with setNotificationHandler. Forgetting the foreground handler is the classic "it works when the app is closed but not when it's open" ticket.
Local also draws the boundary with push: no server, no device token, no APNs/FCM — the app schedules against its own OS. Reminders and timers are local; anything triggered by remote state is push.
Red flag: simulating notifications with setTimeout + an in-app banner, or forgetting that the OS — not your JS — owns the delivery. The interviewer is checking you know where the process boundary sits.
Say it: "Local notifications hand delivery to the OS scheduler, so they survive backgrounding and kill — my job is permission first, content plus trigger, and a foreground handler so iOS shows them while the app is open."