You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Empty page data to be used as the fallback value */constpageDataEmpty=readonly({key: '',path: '',title: '',lang: '',frontmatter: {},excerpt: '',headers: [],}asPageData)asPageData/** * Global page data ref */exportconstpageData: PageDataRef=ref(pageDataEmpty)/** * Returns the ref of the data of current page */exportconstusePageData=<TextendsRecord<any,any> = Record<never,never>>(): PageDataRef<T> =>pageDataasPageDataRef<T>
The pageData is async load.
In my mind, the pageData should be tracked, which is only read.