rsnext/examples/with-dynamic-app-layout/README.md
Shu Uesugi 5f041447bc
Remove Now CLI reference from examples (#10501)
* Find/Replace "Deploy it to the cloud..."

* Find/Replace "Deploy it to the cloud..." (no colon)

* Find/Replace "Deploy it to the cloud..." for firebase

* Convert remaining ones

* Storybook deployment

* Update with-stripe-typescript

* Update contributing.md

* Remove `now`

* Update examples/with-stripe-typescript/README.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
2020-02-12 17:14:57 -05:00

1.5 KiB

With dynamic App layout example

Shows how to use app.js to implement _dynamic layouts for pages. This is achieved by attaching a static Layout property to each page that needs a different layout. In that way, once we use _app.js to wrap our pages, we can get it from Component.Layout and render it accordingly.

Deploy your own

Deploy the example using ZEIT Now:

Deploy with ZEIT Now

How to use

Using create-next-app

Execute create-next-app with npm or Yarn to bootstrap the example:

npm init next-app --example with-dynamic-app-layout with-dynamic-app-layout-app
# or
yarn create next-app --example with-dynamic-app-layout with-dynamic-app-layout-app

Download manually

Download the example:

curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-dynamic-app-layout
cd with-dynamic-app-layout

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev

Deploy it to the cloud with ZEIT Now (Documentation).