mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
commit
ce280e8cf1
10
Readme.md
10
Readme.md
|
@ -30,9 +30,9 @@ Every `import` you declare gets bundled and served with each page
|
||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import cowsay from 'cowsay'
|
import cowsay from 'cowsay-browser'
|
||||||
export default () => (
|
export default () => (
|
||||||
<pre>{ cowsay('hi there!') }</pre>
|
<pre>{ cowsay({ text: 'hi there!' }) }</pre>
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ We use [Aphrodite](https://github.com/Khan/aphrodite) to provide a great built-i
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { css, StyleSheet } from 'next/css'
|
import { css, StyleSheet } from 'next/css'
|
||||||
|
|
||||||
export default () => {
|
export default () => (
|
||||||
<div className={ css(styles.main) }>
|
<div className={ css(styles.main) }>
|
||||||
Hello world
|
Hello world
|
||||||
</div>
|
</div>
|
||||||
})
|
)
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
main: {
|
main: {
|
||||||
|
@ -70,11 +70,13 @@ We expose a built-in component for appending elements to the `<head>` of the pag
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
export default () => (
|
export default () => (
|
||||||
|
<div>
|
||||||
<Head>
|
<Head>
|
||||||
<title>My page title</title>
|
<title>My page title</title>
|
||||||
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
|
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
|
||||||
</Head>
|
</Head>
|
||||||
<p>Hello world!</p>
|
<p>Hello world!</p>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue