1 points · by laurent_blondy · 1y ago · 2 comments
I created upfetch because I needed a simple, lightweight, and reusable data-fetching solution for all my projects. Libraries like Axios felt like overkill, while other alternatives lacked composability or strayed too far from the familiarity of the Fetch API.
upfetch is designed to be a minimal, composable, and scalable fetching solution that stays close to the native Fetch API while making common patterns easier to manage.
It worked by composing logic with S-expression like syntax, e.g.
fetcher = compose(
setUrl(x),
acceptJSON(),
compose(a, b, ...c)
)
And then to allow these composed functions to hook in simple request / response middlewareIt seems hard to get traction on a new project though. And these days I tend to use OpenAPI -> client generation. It's hard for me to work on a project I probably wouldn't use myself.
That said, competition is a good thing and I'm glad people are still building these.