Rocky_Mountain_Vending/.pnpm-store/v10/files/8b/6c9c17eeda1091e5cde286a59f1f0abccbb730ab7d6146ceb7c83c61a5e38a87241df3a82b86a138256c29c69238ca8679dd9fbf188cf641217afe6d0222c0
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

27 lines
1.4 KiB
Text

import type { FlightRouterState } from '../../shared/lib/app-router-types';
export type RouterBFCacheEntry = {
tree: FlightRouterState;
stateKey: string;
next: RouterBFCacheEntry | null;
};
/**
* Keeps track of the most recent N trees (FlightRouterStates) that were active
* at a certain segment level. E.g. for a segment "/a/b/[param]", this hook
* tracks the last N param values that the router rendered for N.
*
* The result of this hook precisely determines the number and order of
* trees that are rendered in parallel at their segment level.
*
* The purpose of this cache is to we can preserve the React and DOM state of
* some number of inactive trees, by rendering them in an <Activity> boundary.
* That means it would not make sense for the the lifetime of the cache to be
* any longer than the lifetime of the React tree; e.g. if the hook were
* unmounted, then the React tree would be, too. So, we use React state to
* manage it.
*
* Note that we don't store the RSC data for the cache entries in this hook —
* the data for inactive segments is stored in the parent CacheNode, which
* *does* have a longer lifetime than the React tree. This hook only determines
* which of those trees should have their *state* preserved, by <Activity>.
*/
export declare function useRouterBFCache(activeTree: FlightRouterState, activeStateKey: string): RouterBFCacheEntry;