Skip to main content
Version: v8.0.0

HydrateProps


Import
import { HydrateProps } from "@hyper-fetch/react"

Preview​

type HydrateProps = {
children?: React.ReactNode;
client: ClientInstance;
data?: (HydrateDataType | EmptyTypes)[] | EmptyTypes;
options?: HydrateOptionsType;
}

Structure​

HydrateProps
NameTypeDescription
children
React.ReactNode

Children to render

client
ClientInstance

Client which cache receives the hydrated data

data
(HydrateDataType | EmptyTypes)[] | EmptyTypes

Dehydrated items, usually created on the server with request.dehydrate() . Empty values are ignored, so the list can be built conditionally.

options
HydrateOptionsType

Options applied to every item, as an object or a function of the item