Fresh defer load
So, I've been having some problems with fresh, but been working it out, kinda.
The problem now is fetching. I'm fetching from both the github api and the gitlab api, but I don't want the user to notice it that much, I'll just add a
Loading ...
message there.
The thing, how can I do it with fresh? In other frameworks, I could just return a promise and it would just defer for me, or the usage of some kind of a suspense would do that, but I haven't seen anything on the docs about defer load or returning a promise from the loader. Is there just no conventional way of doing it? Do I need to do it the "old" way (create an api endpoint, return the data, call fetch on an island and pray it works)?0 Replies