Fork me on GitHub
#helix
<
2020-12-01
>
lilactown00:12:25

Wasn’t me that wrote it but another community member 😌 I’m continuously pleased with the quality and amount of contributions from others to helix, docs and otherwise

geraldodev12:12:32

Yesterday someone pointed me to https://github.com/vercel/swr that deduplicates request to the server. I assumed that it's not compatible with cljs, because I didn't found a mention on slack (and it inspects the data). Do we have a ibrary that we use with helix that have a similar role ?

dominicm14:12:05

@geraldodev I think it will work with cljs, I've been evaluating it for use with cljs (in #C012GLC2SAZ I talked about it). I know of no equivalent library. It should even work with cljs-http! As you can use your own fetcher.

👍 3
dominicm14:12:30

@geraldodev If you get it working, I'd find a gist describing how very useful!

ferossgp16:12:43

It depends on the usecase, but dedup and cancelling of request could be managed with https://github.com/keechma/keechma-pipelines

👍 6
lilactown16:12:37

It doesn’t look like SWR cares about what data you return

lilactown16:12:34

The API they specify in their README: • keys are strings • Fetchers are functions that take a key and return a promise

lilactown16:12:13

I don’t think it inspects the data returned by the fetcher at all. I don’t see anything about e.g. data normalization

lilactown16:12:38

So all that said I would guess it would work great with CLJS

👍 3