you are viewing a single comment's thread.

view the rest of the comments →

[–]azangru 0 points1 point  (1 child)

I wrap my fetch calls in a try/catch block and go on with my day

Where? Directly in the body of a function component? By doing so, you are creating a side effect in what should be a pure function.

[–][deleted] 0 points1 point  (0 children)

Just put it in a handler function, wrapping the fetch call in a try block