Skip to content

Commit

Permalink
Use named functions in layouts docs (#27297)
Browse files Browse the repository at this point in the history
## Documentation / Examples
- [x] Make sure the linting passes

Fixes #27252 by using a named function rather than an arrow function. If this is the correct fix, then modifications are also needed for the `layout-component` example, but I'm just providing this one modification right now in case this fix is incorrect.
  • Loading branch information
samrobbins85 committed Jul 19, 2021
1 parent 2b319cc commit 187f431
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/basic-features/layouts.md
Expand Up @@ -66,11 +66,13 @@ export default function Page() {
}
}

Page.getLayout = (page) => (
<Layout>
<NestedLayout>{page}</NestedLayout>
</Layout>
)
Page.getLayout = function getLayout(page) {
return (
<Layout>
<NestedLayout>{page}</NestedLayout>
</Layout>
)
}
```

```jsx
Expand Down

0 comments on commit 187f431

Please sign in to comment.