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
exportdefault{asyncgetInitialData({ getServerCache }){// On server-side, you can access Saber's Node APIif(process.server){constreposCount=awaitaxios.get(`https://my.repos.count/api`)// Return the data you want to inject as component data// We cache the result as JSON so that you can access it via `getServerCache`return{ reposCount }}// On client-side, you use the server cache which is `{ reposCount }`returngetServerCache()}}
The text was updated successfully, but these errors were encountered:
Feature request
What problem does this feature solve?
Provide an alternative to Gatsby's page query and Nuxt's asyncData.
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: