Activity and preload
Compare three strategies for the same ~1s tab fetch:
- No prefetch — the fetch starts when the visible tab’s owner commits; the Suspense fallback shows
- Hover preload —
preloadObservablePromiseonmouseenterwarms the cache before the click - Activity pre-render — an always-visible wrapper owns
useObservablePromisefor every tab and passes each promise into a hidden<Activity>panel, which pre-renders with the data as it arrives
Rendering never starts a fetch: a hook called inside a hidden <Activity> tree stays paused until the tree is revealed. Pre-rendering hidden content with data therefore means owning the promise in a visible component and letting the hidden tree use() it.
Last updated on