Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ssr migration guide #6620

Merged
merged 10 commits into from
Dec 12, 2023
14 changes: 11 additions & 3 deletions src/directory/directory.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,19 @@ export const directory = {
},
{
path: 'src/pages/[platform]/build-a-backend/push-notifications/push-notifications-migration-guide/index.mdx'
},
}
]
},
{
path: 'src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx'
path: 'src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx',
children: [
{
path: 'src/pages/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx'
},
{
path: 'src/pages/[platform]/build-a-backend/server-side-rendering/nextjs-v5-to-v6-migration-guide/index.mdx'
}
]
},
{
path: 'src/pages/[platform]/build-a-backend/utilities/index.mdx',
Expand Down Expand Up @@ -664,7 +672,7 @@ export const directory = {
},
{
path: 'src/pages/[platform]/build-a-backend/more-features/in-app-messaging/in-app-messaging-migration-guide/index.mdx'
},
}
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions src/fragments/lib/troubleshooting/common/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -927,13 +927,13 @@ For a deeper look at v6 Utilities, check out our [Utilities documentation](/[pla

### Server-side Rendering

<Callout>
<Callout>Find a comprehensive summary of changes to Server-Side Rendering in the [NextJS migration guide](/[platform]/build-a-backend/server-side-rendering/nextjs-v5-to-v6-migration-guide/)</Callout>

DataStore is no longer supported in an SSR context: if you are using DataStore within your SSR project, you will need to migrate to the API category.
The Amplify JS v5 `withSSRContext` utility is no longer available with Amplify JS v6. You will need to use the `runWithAmplifyServerContext` function exported from `@aws-amplify/adapter-nextjs` to use Amplify categories on the server side of your Next.js app.

</Callout>
> Note: DataStore is no longer supported in an SSR context: if you are using DataStore within your SSR project, you will need to migrate to the API category. For details on how to accomplish this, see the [NextJS migration guide: Migrating from DataStore to API in a server context](/[platform]/build-a-backend/server-side-rendering/nextjs-v5-to-v6-migration-guide/#migrating-from-datastore-to-api-in-a-server-context)

The Amplify JS v5 withSSRContext utility is no longer available with Amplify JS v6. You will need to use the runWithAmplifyServerContext function exported from @aws-amplify/adapter-nextjs to make Amplify API calls on the server side of your Next.js app. Use the switcher below to see the differences between v5 and v6:
Use the switcher below to see the differences between v5 and v6:

<BlockSwitcher>

Expand Down
Loading
Loading