React Native interview question · Most asked

How do push notifications work in a React Native app?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

The app asks for permission, obtains a device push token (an Expo push token or native APNs/FCM token), sends it to your server, and the server sends messages through the push service. Taps are handled by reading the notification's data and navigating.

Longer Answer

Ask for permission in context. Store multiple tokens per user and delete tokens reported invalid. Android needs notification channels. Handle three tap cases: app in foreground, in background, and launched from a killed state (read the last notification response at startup). Only navigate to internal routes from notification data.

Key Points

  • Permission → token → server → push service.
  • Multiple tokens per user; prune invalid ones.
  • Route taps from data, including cold start.

Deep dive: Mobile Apps with React Native and Expo: Push Notifications

Explanation

What interviewers look for

End-to-end understanding including the server side and cold-start handling.

More most-asked React Native questions

← All React Native questions

Was this page helpful?