Open History to see the last commit
1import type { HydrationPrefetchStrategy } from './types'
2β
3const loadType = 'load'
4β
5const loadStrategy: HydrationPrefetchStrategy<typeof loadType> = {
6 _t: loadType,
7 _d: () => false,
8 _s: ({ gate, prefetch }) => {
9 ;(prefetch ?? gate!.resolve)()
10 },
11}
12β
13/* @__NO_SIDE_EFFECTS__ */
14export function load(): HydrationPrefetchStrategy<typeof loadType> {
15 return loadStrategy
16}