-
Hey there, as this library is standing out regarding performance I wanted to ask which library I should use for universal http fetching. I know axios but I am not sure if its the best/fastest option out there. I only want to be able to get the data within node and within browser :) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
I moved this to discussions since it seems the right sort of question. Honestly it's a trade off between features and size I think. Raw requests are pretty much constrained by underly native mechanisms being used. You will see me and most authors in demos do simple stuff like An interesting question is with the dawn of query libraries like React Query, RTK Query, SWR in the React ecosystem will we see less use of things like axios as they do the complex lifting and see people use very simple I almost want to see if https://github.com/lukeed has made a request client since I'm pretty sure it would be what I'd be looking for. His stuff is small, fast, and reasonably flexible. And my go to when I need small utilities. |
Beta Was this translation helpful? Give feedback.
-
I am actually using https://github.com/reactiverse/es4x as a server backend instead of When I make some progress I'll leave a message here so that others can make use of it :) |
Beta Was this translation helpful? Give feedback.
-
I'd recommend If it's too limited in term of features, I'd highly recommend |
Beta Was this translation helpful? Give feedback.
-
If you are interested, I was able to make an example run using You can find the full example here: https://gitlab.com/BeneStem/es4x-flower If you have any time to give me feedback or some hints would be great. Maybe we can use this "starter"-like example project somewhere to make it easier for ppl to start with solid... Anyways, great work, I love this framework! |
Beta Was this translation helpful? Give feedback.
If you are interested, I was able to make an example run using
fetch
on the client side and using a database connection when server side rendering...The hint regarding
isServer
was exactly right!You can find the full example here: https://gitlab.com/BeneStem/es4x-flower
And the part where I am fetching the data here: https://gitlab.com/BeneStem/es4x-flower/-/blob/master/src/client/page/Products.tsx#L12
If you have any time to give me feedback or some hints would be great.
Maybe we can use this "starter"-like example project somewhere to make it easier for ppl to start with solid...
Anyways, great work, I love this framework!