react/packages/react-cache
Andrew Clark d6cb4e7713
Start prerendering Suspense retries immediately (#30934)
When a component suspends and is replaced by a fallback, we should start
prerendering the fallback immediately, even before any new data is
received. During the retry, we can enter prerender mode directly if
we're sure that no new data was received since we last attempted to
render the boundary.

To do this, when completing the fallback, we leave behind a pending
retry lane on the Suspense boundary. Previously we only did this once a
promise resolved, but by assigning a lane during the complete phase, we
will know that there's speculative work to be done.

Then, upon committing the fallback, we mark the retry lane as suspended
— but only if nothing was pinged or updated in the meantime. That allows
us to immediately enter prerender mode (i.e. render without skipping any
siblings) when performing the retry.
2024-09-11 11:41:54 -04:00
..
npm Don't minify symbols in production builds (#28881) 2024-04-20 11:23:46 -04:00
src Start prerendering Suspense retries immediately (#30934) 2024-09-11 11:41:54 -04:00
index.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
package.json [UMD] Remove umd builds (#28735) 2024-04-17 11:15:27 -07:00
README.md Rename simple-cache-provider to react-cache (#13755) 2018-10-01 09:07:40 -06:00

react-cache

A basic cache for React applications. It also serves as a reference for more advanced caching implementations.

This package is meant to be used alongside yet-to-be-released, experimental React features. It's unlikely to be useful in any other context.

Do not use in a real application. We're publishing this early for demonstration purposes.

Use it at your own risk.

No, Really, It Is Unstable

The API may will change wildly between versions.