Skip to content

Commit

Permalink
chore: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 30, 2023
1 parent ae3a278 commit 3ca25d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content/blog/shared-data-nuxt-generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ You can check out this [full StackBlitz example](https://stackblitz.com/edit/nux

## Payload extraction

It gets even better. Nuxt turns something called 'payload extraction' when you prerender your pages. (You can also turn it on manually even when you have a runtime server, with the `experimental.payloadExtraction` option.)
It gets even better. Nuxt turns on something called 'payload extraction' when you prerender your pages. (You can also turn it on manually even when you have a runtime server, with the `experimental.payloadExtraction` option.)

Without payload extraction, your data fetching composables (`useFetch` and `useAsyncData`) will rerun on _client-side_ navigation. But _with_ it, this data is extracted into a `payload.json` file which can be used instead of rerunning the composables.

If you are prerendering every route of your app, you can therefore confidently early return or throw an error which means your data fetching code also be tree shaken out from your final app. (That's what I do in my website: [see here](https://github.com/danielroe/roe.dev/blob/main/src/components/TheTalks.server.vue#L37-L38) for example.)
If you are prerendering every route of your app, you can therefore confidently early return or throw an error which means your data fetching code can also be tree shaken out from your final app. (That's what I do in my website: [see here](https://github.com/danielroe/roe.dev/blob/main/src/components/TheTalks.server.vue#L37-L38) for example.)

## Next steps for prerendering optimisations

Expand Down

1 comment on commit 3ca25d2

@vercel
Copy link

@vercel vercel bot commented on 3ca25d2 Dec 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.