iOS應用程序 - 人們如何處理Internet連接停機以提供最佳用戶體驗? - iOS App - how do people handle Internet connection downtime to provide the best UX? -开发

iOS應用程序 - 人們如何處理Internet連接停機以提供最佳用戶體驗? - iOS App - how do people handle Internet connection downtime to provide the best UX? -开发,第1张

I'm about to begin building my 2nd React Native app and I'd like a friendlier way to handle any Internet connection downtime should it suddenly drop out. Currently I check for a connection when executing any Fetch call and then use try/catch to display a retry component if it failed. This renders a button which re-calls the function on-press. I'm Just curious to see how other people handle this and whether I can improve my users experience!

我即將開始構建我的第二個React Native應用程序,如果它突然退出,我想要一個更友好的方式來處理任何Internet連接停機時間。目前我在執行任何Fetch調用時檢查連接,然后使用try / catch在失敗時顯示重試組件。這將呈現一個按鈕,可以在按下時重新調用該功能。我很想知道其他人如何處理這個以及我是否可以改善用戶體驗!

1 个解决方案

#1


0  

I would have it retry 3 times automatically. If your app can partially function offline, then you can just show that part as offline and continue to try and update every second or so.

我會自動重試3次。如果您的應用程序可以部分脫機運行,那么您只需將該部分顯示為脫機並繼續嘗試每秒更新一次。

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复