BetterTyped / hyper-fetch

⚡ Fetching and realtime data exchange framework.
https://hyperfetch.bettertyped.com/
Apache License 2.0
1.02k stars 27 forks source link

Today this is not usable with Svelte (and others) and I think this is to fix on the website claim #48

Closed frederikhors closed 1 year ago

frederikhors commented 1 year ago

This is not really a bug, but is important to edit the website claim I think.

On the homepage you mention Svelte (and others):

image

But this is not usable in Svelte (and others) today. So I think you should change that unless you don't mind losing credibility.

prc5 commented 1 year ago

@frederikhors Hey! Can you elaborate on why isn't it usable with Svelte (and others)? Is there any bug preventing you to use it?

We had projects and issues based on React, Vue, Svelte and Node using HF. We don't have particular adapters, which are required only for better utilization of these environments, but it's only lifecycle and environment adjustments. Core is providing logic for most of the features listed in docs and website - probably like over 95% 😅

Currently we don't have all of the adapters ready to provide hooks for svelte or vue - yes, this is indeed inconvenience. Is it possible to use it with Svelte or Vue - yes, it is. Hyper Fetch is more like axios rather than react query or SWR.

I answered similar question / problem in here with more details.

Currently we have implementation in react with adapters allowing to hook into listeners and provide better lifecycle utilization, but it's only it, nothing crucial - probably two more features are deep comparison and pooling.

We are going to add more adapters soon, right now we want to make it better, more reusable, faster, add much more tests and some integrations like the one from 4.0 with first class firebase support.

After making some more improvements to the core logic we are going to iterate on other environments.

So, to summarize, currently we want to stabilize HF even more with tests, typescript tests and optimizations, more configuration options and documentation, then we are going to iterate on the other improvements - also hooks for other frameworks 🚀

frederikhors commented 1 year ago

I'm sorry but - as I always do - I started following the documentation and read this:

image

However, we only currently support React.

Now you are telling me that I can use it using "core". Wow. Now I'll try, but maybe the documentation needs to be fixed.

Sorry again and I'll let you know as soon as I try.

I'm a fussy Svelte user who could be useful to you as a fussy beta tester. 😄

prc5 commented 1 year ago

@frederikhors Aha! good catch! This is indeed not so clear topic hah 😅 By describing "support" I meant that we provided extra hooks for this environment, it's more refined, we created it especially for the lifecycle and rules of it. React is our main stack, so it is easier for us to make this support earlier. Svelte and Vue and many more could benefit most of the HF features, but it will not understand lifecycle so I can't tell it's fully "supported", because my requirements are much more than what it is now.

If you want, you can provide the hooks for svelte. I can fully support you along this and give you the idea of what should be done 😄 Thanks for your support! Also worth noticing is the fact that we will release 4.0 in ~ week so this breaking change will be quite massive since we fixed and improved a lot of types and functionalities!