Noob question: Axios vs Fetch
I did not see anything in the docs explaining fetch.
Does fetch have some built in "magic" that makes it preferable to use over Axios or another request package?
4 Replies
fetch is usually available already, so it doesn't increase the bundle size.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
It fulfills the same needs with a slightly higher level of sophistication, I suppose. It also does more than that.
I guess it depends what you need. In Solid, we usually appreciate that one size doesn't fit all, so we're happy to have solutions on different levels of complexity and sophistication.
There are different projects catering to different needs: solid-primitives delivers the building blocks beyond solid's own primitives to connect into your own simple solution. Solid-start as a meta framework brings the patterns and binding glue for isomorphic applications. TanStack has a framework-agnostic integrated state-management solution.
Solid-primitives are usually really small and tree-shakable, so if a low bundle size is your goal, those are your best bet. They also usually work well with all other solutions.
Solid-start is your best choice for fully isomorphic solid apps.
TanStack is tried and tested, fully integrated with all bells and whistles; it's obviously large in comparison, but has a pretty sweet DX.