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
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 ?
@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.
@geraldodev If you get it working, I'd find a gist describing how very useful!
It depends on the usecase, but dedup and cancelling of request could be managed with https://github.com/keechma/keechma-pipelines
It doesn’t look like SWR cares about what data you return
The API they specify in their README: • keys are strings • Fetchers are functions that take a key and return a promise
I don’t think it inspects the data returned by the fetcher at all. I don’t see anything about e.g. data normalization
So all that said I would guess it would work great with CLJS