import { createContext } from 'react' import type { PagesLoaded } from '../../clientTypes' /** * During ssr hydration, we pass all the data needed by App * with this ctx * so the App can render the page data directly * instead of render the loading state */ export const dataCacheCtx = createContext({}) export const setDataCacheCtx = createContext< React.Dispatch> >(() => { throw new Error(`setDataCacheCtx not found`) })