2018-04-24 21:30:24 +02:00
# With `App` layout example
## How to use
### Using `create-next-app`
Execute [`create-next-app` ](https://github.com/segmentio/create-next-app ) with [Yarn ](https://yarnpkg.com/lang/en/docs/cli/create/ ) or [npx ](https://github.com/zkat/npx#readme ) to bootstrap the example:
```bash
npx create-next-app --example with-app-layout with-app-layout-app
# or
yarn create next-app --example with-app-layout with-app-layout-app
```
### Download manually
2018-07-11 23:56:15 +02:00
Download the example:
2018-04-24 21:30:24 +02:00
```bash
curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-app-layout
cd with-app-layout
```
Install it and run:
```bash
npm install
npm run dev
# or
yarn
yarn dev
```
Deploy it to the cloud with [now ](https://zeit.co/now ) ([download](https://zeit.co/download))
```bash
now
```
## The idea behind the example
2019-04-22 16:56:02 +02:00
Shows how to use \_app.js to implement a global layout for all pages.