File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ unstable_noStoreを使って静的レンダリングをオプトアウトできる.
Original file line number Diff line number Diff line change
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 ` のコンポーネント版
Original file line number Diff line number Diff line change
1
+ ### Partial Pre-Rendering
2
+ よくわかってないが,前章でやった` <Suspense> ` を使うやつのこと?
You can’t perform that action at this time.
0 commit comments