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