1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-flow/components/Page.js
Tomek c090a57e77 update with-flow example (#4835)
Changes:
* updated packages
* moved the content of `layout` to `_app.js` and created simple `Page` component
* replaced `import * as React` because it is not necessary to import everything
* moved `next.js.flow` to `flow-typed` as it is default directory for library definitions
* updated the gif
2018-07-25 13:42:40 +02:00

18 lines
306 B
JavaScript

// @flow
import React, { type Node } from 'react'
import Head from 'next/head'
type Props = {
children: Node,
title?: string
}
export default ({ children, title = 'This is the default title' }: Props) => (
<section>
<Head>
<title>{title}</title>
</Head>
{children}
</section>
)