回答編集履歴
1
修正と追記
answer
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
Route の render属性の props 引数って何が入ってくるんでしょう。
|
1
|
+
~~Route の render属性の props 引数って何が入ってくるんでしょう。~~
|
2
|
+
失礼しました。withRouter でコンポーネントをラップした時と同様の props が追加されます。
|
3
|
+
[https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/api/withRouter.md](https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/api/withRouter.md)
|
4
|
+
|
2
5
|
イマイチ意図を汲み取れなかったので誤解してるかもしれませんが、とりあえず react-router-dom@4 の Basic Example を元に書いて見ましたが動作してると思います。
|
3
6
|
[https://reacttraining.com/react-router/web/example/basic](https://reacttraining.com/react-router/web/example/basic)
|
4
7
|
|
@@ -51,4 +54,9 @@
|
|
51
54
|
);
|
52
55
|
|
53
56
|
export default () => <BasicExample url="http://ip.jsontest.com"/>;
|
54
|
-
```
|
57
|
+
```
|
58
|
+
|
59
|
+
### 追記
|
60
|
+
|
61
|
+
どちらにせよ Route に与えられたコンポーネントの render メソッド以外で、どの props も問題なく見れました。
|
62
|
+
やはり、どういう問題が起きているかよくわからないので、HayatoKamono さんがおっしゃっているように、質問内容の加筆を希望します。
|