Posted On: Sep 15, 2020
Amplify JavaScript is part of the open source Amplify Framework, a suite of libraries, UI components, and tools for front-end web and mobile developers. When using Amplify JavaScript to build web applications, you can now incorporate server-side rendering (SSR) with frameworks like Next.js and Nuxt.js. Next.js and Nuxt.js enable developers to use SSR, as well as static site generation and client-side rendering, to build fast, modern sites. These frameworks have grown in popularity as developers take advantage of their great developer experience and features like API routes, incremental static regeneration, code splitting, and SEO-friendliness.
The new SSR support in Amplify JavaScript allows developers to use its Authentication, GraphQL API, REST API, and DataStore capabilities in server environments. Amplify JavaScript seamlessly manages the session of users across both the client (browser) and the server, enabling developers to make authentication calls and authenticated API requests in both API routes as well as server-rendered pages. Developers can also use Amplify JavaScript to make GraphQL API, REST API, and DataStore calls to hydrate their application state on the server (for server-side rendering) or in build steps (when generating static sites) in frameworks like Gatsby, Next.js, Nuxt.js, and Gridsome. These capabilities make Amplify JavaScript an ideal data layer for serverless and JAMstack apps.
For more details on how to use Amplify JavaScript with SSR support, refer to our blog post and documentation. To learn more about AWS Amplify, go to our web page.