回答編集履歴
1
修正と追記
test
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
Route の render属性の props 引数って何が入ってくるんでしょう。
|
1
|
+
~~Route の render属性の props 引数って何が入ってくるんでしょう。~~
|
2
|
+
|
3
|
+
失礼しました。withRouter でコンポーネントをラップした時と同様の props が追加されます。
|
4
|
+
|
5
|
+
[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)
|
6
|
+
|
7
|
+
|
2
8
|
|
3
9
|
イマイチ意図を汲み取れなかったので誤解してるかもしれませんが、とりあえず react-router-dom@4 の Basic Example を元に書いて見ましたが動作してると思います。
|
4
10
|
|
@@ -105,3 +111,13 @@
|
|
105
111
|
export default () => <BasicExample url="http://ip.jsontest.com"/>;
|
106
112
|
|
107
113
|
```
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
### 追記
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
どちらにせよ Route に与えられたコンポーネントの render メソッド以外で、どの props も問題なく見れました。
|
122
|
+
|
123
|
+
やはり、どういう問題が起きているかよくわからないので、HayatoKamono さんがおっしゃっているように、質問内容の加筆を希望します。
|