This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I maintain an application which is online-first (if that's even a phrase) in so far as it is relatively safe to assume that users will have online access. (It's a dating app, so lots of searching and online functionality.)
That being said, user devices go offline for lots of reasons - bad cell service, spotty Wi-Fi, airplane mode, general network flakiness, whatever. Most of my client-side errors, after squashing logic/code issues, stem from failed network requests or offline conditions.
What would you consider to be "best practice" for the client to handle these situations?
It seems to boil down to two main failure modes:
- Device is offline and we know it, e.g. the app can subscribe to device info to be told it is offline, e.g. no network connection.
- Device thinks it's online but network conditions result in unpredictable network failures. I know I should be handling this through promise rejections, etc., however what am I likely not doing that you are? E.g., locking out the UI until we can detect a better network environment, etc.?
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/reactnative...