Skip to content

Commit fc3ecf6

Browse files
authored
Merge pull request #47 from Atotti/hiro
Chapter18-20
2 parents da480a4 + 6ae23d9 commit fc3ecf6

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

hiro/nextjs08/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unstable_noStoreを使って静的レンダリングをオプトアウトできる.

hiro/nextjs09/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### ストリーミング
2+
ルートをより細かな部分に分割した「チャンク」を提供する技術
3+
準備が整ったものから段階的にストリーミングされる
4+
5+
#### 実装
6+
ストリーミングをNextjsで実装する方法は次の2つ.
7+
- (ページレベル)`loading.tsx`ファイルを使う
8+
- (コンポーネントレベル)`<Suspense>`を使う
9+
10+
#### loading.tsx
11+
`loading.tsx`を任意のルートに配置するだけ.これがフォールバックになってくれる
12+
13+
##### ルートグループ
14+
ディレクトリ名に()で包んだ名前を使用すると次の効果がある.
15+
- URLにルーティングされなくなる
16+
- 親ディレクトリのページの要素として扱える
17+
これによって,`/app/dashboard/(overview)/loading.tsx`にdashboardのストリーミングのコンポーネントを書くことでdashboardにのみ影響させることができる(`loading.tsx``invoices``custmers`の親ディレクトリにはない扱いになる)
18+
19+
#### <Suspense>
20+
`loading.tsx`のコンポーネント版

hiro/nextjs10/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Partial Pre-Rendering
2+
よくわかってないが,前章でやった`<Suspense>`を使うやつのこと?

0 commit comments

Comments
 (0)