Skip to content

Commit 6900980

Browse files
authored
doc: update nextjs.md (#274)
1 parent 28066ae commit 6900980

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/nextjs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export default Blog
201201
- Next.js 在后台触发页面的重新生成
202202
- 一旦页面生成成功,Next.js 将使缓存失效并显示更新后的页面。如果后台重新生成失败,旧页面仍将保持不变
203203

204-
### 使用 useeffect 客户端数据获取
204+
### 使用 useEffect 客户端数据获取
205205

206206
```jsx
207207
import { useState, useEffect } from 'react'
@@ -399,7 +399,7 @@ const path = require('path')
399399

400400
module.exports = {
401401
sassOptions: {
402-
includePaths:
402+
includePaths:
403403
[path.join(__dirname, 'styles')],
404404
},
405405
}
@@ -1336,7 +1336,7 @@ NEXT_PUBLIC_ANALYTICS_ID=abcdefghijk
13361336
// pages/index.js
13371337
import setupAnalyticsService from '../lib/my-analytics-service'
13381338

1339-
//
1339+
//
13401340
// 它将在构建时转换为 `setupAnalyticsService('abcdefghijk')`
13411341
setupAnalyticsService(process.env.NEXT_PUBLIC_ANALYTICS_ID)
13421342

@@ -1528,11 +1528,11 @@ export default function Home() {
15281528
15291529
```js
15301530
// GET `/post` (empty object)
1531-
{ }
1531+
{ }
15321532
// `GET /post/a` (single-element array)
1533-
{ "slug": ["a"] }
1533+
{ "slug": ["a"] }
15341534
// `GET /post/a/b` (multi-element array)
1535-
{ "slug": ["a", "b"] }
1535+
{ "slug": ["a", "b"] }
15361536
```
15371537
15381538
### 事件执行调整页面

0 commit comments

Comments
 (0)