Support for Suspense in RTK Query
See original GitHub issueRedux Toolkit and RTK Query are awesome, and have really made it easier to get things working quickly and well.
What would be really good though is to have support for the React Suspense API, so that we can render a fallback component whilst data is loading without needing to handle it in-component with the isLoading flag.
Itās not a huge deal, but it just makes things that little bit neater to have a wrapper around the component that handles this instead.
Cheers
Issue Analytics
- State:
- Created 2 years ago
- Reactions:27
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Mark Erikson on Twitter: "Oh wow, this is cool - Twitter
Oh wow, this is cool - Faber Vitale (author of the RTK Query ... a PR to add proof-of-concept Suspense query hook support...
Read more >Using Suspense and React Query: Tutorial with examples
Suspense simplifies managing loading states in React components, supporting fallbacks in case the component hasn't finished loading yet.
Read more >API Slices: Utilities | Redux Toolkit
API Slices: Utilities. The API slice object includes various utilities that can be used for cache management, such as implementingĀ ...
Read more >Will redux be integrating with suspense data fetching? - Reddit
We do hope to potentially integrate Suspense support into RTK Query, but haven't tried to implement that yet.
Read more >How i can get suspense to work on react 18? - Stack Overflow
Suspense is a very smart paradygm based on fetch-while-render strategy. ... Fetching libraries like react-queris or RTK-query will implementĀ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like 1.7 released last month, and the suspense is killing me š
RTK 1.7 will have the necessary internal changes for that. (see #1277) After that weāll probably release an external package marked as āunstableā with a module for suspense hooks.