import React from "react"; import { NextPageContext } from "next"; type SSRPageProps = { name: string; }; export default function SSRPage(props: SSRPageProps): JSX.Element { return ( {`Hello ${props.name}! This is an SSR Page using getInitialProps().`} ); } // getInitialProps() is the old way of doing SSR SSRPage.getInitialProps = async ( ctx: NextPageContext ): Promise => { return { name: "serverless-next.js" }; };