Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

idle.ts

22 lines600 Bytes

1'use client'
2​
3import {
4 idle as coreIdle,
5 withHydrationRenderer,
6} from '@tanstack/start-client-core/hydration'
7import { GenericHydrate } from '../GenericHydrate'
8import type {
9 HydrationPrefetchStrategy,
10 IdleHydrationOptions,
11} from '@tanstack/start-client-core/hydration'
12import type { ReactHydrationStrategy } from '../Hydrate'
13​
14/* @__NO_SIDE_EFFECTS__ */
15export function idle(
16 options: IdleHydrationOptions = {},
17): ReactHydrationStrategy<'idle', true> & HydrationPrefetchStrategy<'idle'> {
18 return /* @__PURE__ */ withHydrationRenderer(
19 coreIdle(options),
20 GenericHydrate,
21 )