回答編集履歴
1
遷移についての説明を更新しました
answer
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
1. `http://hoge.com/`
|
13
13
|
2. `http://hoge.com/index.html` => **実際ブラウザが読み込んでいるのはこのファイル**
|
14
|
-
3. `http://hoge.com/detail/1` => History API
|
14
|
+
3. `http://hoge.com/detail/1` => react-router が対応するコンポーネントを読み込んで表示。このとき History API により URL が書き換わっている
|
15
15
|
|
16
16
|
ブラウザリロード、またはダイレクトにアクセスした場合、以下のようになります。
|
17
17
|
|
@@ -21,7 +21,9 @@
|
|
21
21
|
|
22
22
|
1. `http://hoge.com/detail/1`
|
23
23
|
2. `http://hoge.com/index.html` => **URLが rewrite された結果ブラウザが読み込んでいるのはこのファイルになる**
|
24
|
+
3. `http://hoge.com/detail/1` => **react-router が対応するコンポーネントを読み込んで表示**
|
24
25
|
|
26
|
+
|
25
27
|
簡単な確認方法としては、 index.html の `<head>` 内に
|
26
28
|
|
27
29
|
```html
|