4 ms·
Does this include suspense for data fetching? Edit: seems so! Post links to a release announcement on GitHub which says it’s “fully” supported.
by travisd 5y ago
Does this include suspense for data fetching?
Edit: seems so! Post links to a release announcement on GitHub which says it’s “fully” supported.
- danabramov 5y agoI'd say we can say Suspense for data fetching is "done" when Server Components (https://reactjs.org/blog/2020/12/21/data-fetching-with-react-server-components.html https://reactjs.org/blog/2020/12/21/data-fetching-with-react...) and built-in Suspense Cache (https://github.com/reactwg/react-18/discussions/25 https://github.com/reactwg/react-18/discussions/25) are finalized. I would expect this to happen at some point during the 18.x release timeline, but maybe not in the initial release. However, React 18 does include a ton of work around Suspense, including: - Fixes to quirks in its existing behavior (https://github.com/reactwg/react-18/discussions/7 https://github.com/reactwg/react-18/discussions/7) - startTransition API which lets you implement the "show old content while new data is loading" UX (https://github.com/reactwg/react-18/discussions/41 https://github.com/reactwg/react-18/discussions/41) - A whole new server renderer that uses <Suspense> for streaming HTML and hydrating the page in independent parts (https://github.com/reactwg/react-18/discussions/37 https://github.com/reactwg/react-18/discussions/37) So it's ongoing but maybe the "whole story" including recommended patterns will not quite be in the initial scope in 18.0 release. I edited the announcement to clarify this.