americanexpress / fetchye

✨ If you know how to use Fetch, you know how to use Fetchye [fetch-yae]. Simple React Hooks, Centralized Cache, Infinitely Extensible.
Apache License 2.0
41 stars 21 forks source link

docs(readme): add error handling to examples #80

Closed smackfu closed 1 year ago

smackfu commented 1 year ago

Description

Fixes #77

Motivation and Context

The examples do not handle the case where fetch throws, which might lead to unexpected bugs in these edge cases.

How Has This Been Tested?

Documentation update. Similar code is used in our project.

Types of Changes

Checklist:

What is the Impact to Developers Using Fetchye?

Better examples that handle all cases.

codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 830cf236385b79c6e576b33c93e048809592cde7:

Sandbox Source
americanexpress/fetchye Configuration
americanexpress/fetchye Configuration
americanexpress/fetchye Configuration