Course lesson
Show a Full Screen Notification When the React Native App is Offline with useNetInfo Hook
We'll use React Native NetInfo to detect whether the user's device is offline. If the device is offline, we will show a full screen "you are offline" message.
- Duration
- 3 min
- Access
- Included
- Transcript
- Retained from source evidence
We'll use React Native NetInfo to detect whether the user's device is offline. If the device is offline, we will show a full screen "you are offline" message.
Resources:
- React Native NetInfo: https://github.com/react-native-netinfo/react-native-netinfo
Expo:
- If using Expo, install the library with
expo install @react-native-community/netinfoas per the docs
Checkpoint: Show a full screen error when the app is offline