Bs-use-fetch, initial version



Published the first version just now:

It doesn’t implement the full Fetch/bs-fetch API, so that is next on my list. But I wanted to show it anyway, in the hope that you guys may provide some useful feedback. So, criticize away :smiley:

UP: Probably the biggest unknown for me is: do we need Suspense compatibility at this point? Is Suspense even a thing in the ReasonReact world?


This looks great, well done! I’m not aware of the state of Suspense in ReasonReact, perhaps @jchavarri knows?


In current ReasonReact there’s a binding to the basic Suspense component, but it hasn’t been updated in a while and it uses a deprecated prop which React warns about at runtime.

In my opinion, suspense shouldn’t be used in a library like this since suspense can’t be combined with using variants for the result. Suspense is it’s own thing really.

However, I think one thing that would eventually need to be handled here is concurrent mode compatibility. But maybe cross that bridge when concurrent mode is more of a thing :smile:


Yeah, still some work to do before that anyway :smile: