-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with Suspense #30
Comments
@ghengeveld, would it be possible to release some experimental argument to Btw, thanks for the awesome library! |
Yes, that's probably going to be the approach. One thing to consider is that we want to keep backwards compatibility with older versions of React. Right now we support 16.3, but I'm fine shifting that to, say, 16.6. As a rule of thumb I'd say supporting up to 3 minor versions back is fair. I actually have a I think integrating Suspense properly will require rethinking how React Async works. Essentially Suspense inverts the flow for async data. In React Async, you fetch data at one point and pass it down the component hierarchy. In Suspense you fetch data and throw it up the tree. This is a pretty big shift in thinking about application architecture. |
I've created a basic example using Suspense with an Async component / useAsync. It's essentially a barebones reimplementation of React Async, which accepts a https://codesandbox.io/s/basic-async-suspense-e5yx7 Try adding/removing the |
PR is here: #153 |
This is an umbrella issue to discuss and implement support for Suspense. The major difference is the way the loading state is rendered, using the Suspense fallback instead of Async.Loading.
Things to consider:
The text was updated successfully, but these errors were encountered: