Skip to content

Handle network offline state #149

@zaniluca

Description

@zaniluca

Summary

Handle the offline state by not performing certain tasks and letting the user know he's offline

Todo / ordered steps

  • Add expo-network
  • Create a useNetworkState() hook that returns a boolean isOnline
  • Inside the App.tsx add a useEffect that checks for isOnline and eventually displays a toast letting the user know he's not online and tho he can't access the latest notifications
  • Disable the queries if the user is offline to not make them wait till the timeout

Possible impacts / side effects on existing features

  • Whole application

Additional notes

Expo Network: https://docs.expo.dev/versions/latest/sdk/network/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions