Skip to content

Commit

Permalink
improve intro
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Mar 14, 2024
1 parent ac1c4ae commit 9b5f3af
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,36 @@
</p>
<br/>

JavaScript library to automatically and gracefully handle network errors.
JavaScript library to automatically handle network issues.

Handli brings sensible defaults to following questions.
- What should happen with the user interface when the server replies a `500 - Internal Server Error`?
- What should happen when the user is offline?
Handli brings sensible defaults to following questions:
- What should happen when the user has a flaky internet connection?
- What should happen when the user is offline?
- What should happen when the server is overloaded and not responsive?
- Etc.
- What should happen with the user interface when the server replies a `500 - Internal Server Error`?
- ...

With Handli, you can forget about network issues and let Handli handle these cases.

If you have specific needs, you can (progressively) customize and override Handli's behavior.

Handli covers all (edge) cases using sensible defaults, all you have to do is to wrap your fetch requests:

~~~js
// ❌ TODO: handle network issues.
const response = await fetch(url)
~~~
~~~js
// ✅ Handli automatically handles network issues.
const response = await handli(() => fetch(url))
~~~


You can write code as if network issues are non-existent and rely upon Handli for handling network errors.
Taht's it: all network issues are now gracefully handled.

It is [customizable](#usage-faq) and [progressively removable](#how-do-i-progressively-remove-handli).
Handli is [fully customizable](#usage-faq) and [progressively removable](#how-do-i-progressively-remove-handli).

[Live Demo](https://brillout.github.io/handli)
[**Live Demo**](https://brillout.github.io/handli)
<br/><br/>


Expand Down

0 comments on commit 9b5f3af

Please sign in to comment.