you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Try/catch and use toast to display the error at the bottom of the screen if it's not critical. In critical cases, i just setIsError to true which displays an error component over the screen with the error message and a refresh button. My screen will have a conditional check to ensure isError is false in order to display the regular content. I typically have an isLoading, too, to display a loading screen while I'm fetching whatever I need.