badgateway/react-ketting

Add support for Suspense

sazzer opened this issue · 2 comments

It would be really useful if this could support the React Suspense API instead of the client needing to pay attention to the loading flag everywhere.

This would then allow for the UIs to use Suspense to put loading screens at appropriate positions in the stack, instead of forcing them to be down at the place that is actually making the API calls.

evert commented

Last time I looked into this, which was a 1-2 months ago, this API did not seem ready. There's a lot of criticism on this API, and I'd say that the community hasn't quite decided yet if this is the way to go.

While conceptually I think the idea behind the feature is great, I think we need to wait for wider community adoption and for suspense to not be marked as 'experimental'.

One option is to do like react-query does and make it optional and disabled by default. But I fully understand the reticence to implement an experimental API 🙂