GetInitialProps: Page3

This illustrates how you can use a layout hierarchy and utilize getInitialProps separately for each layout.

In this example the main title, subtitle and page content are all produced from data fetched with getInitialProps. Note how you can pass "layout props" from downstream layouts (or the page) to a parent layout. In this example the subtitle is passed from the page.

GetInitialProps: Page3

Page3