@tanstack/start-client-core
Version:
Modern and scalable routing for React applications
17 lines (13 loc) • 380 B
text/typescript
import type { HydrationPrefetchStrategy } from './types'
const loadType = 'load'
const loadStrategy: HydrationPrefetchStrategy<typeof loadType> = {
_t: loadType,
_d: () => false,
_s: ({ gate, prefetch }) => {
;(prefetch ?? gate!.resolve)()
},
}
/* @__NO_SIDE_EFFECTS__ */
export function load(): HydrationPrefetchStrategy<typeof loadType> {
return loadStrategy
}