質問編集履歴
3
疑問点の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -33,6 +33,8 @@
|
|
33
33
|
```
|
34
34
|
|
35
35
|
▼chrome側でconsole.logし取得したデータは以下の通り
|
36
|
+
|
37
|
+
(*json_encodeで受け取っているが、配列では無いのはなぜ。。。?)
|
36
38
|
|
37
39
|
![イメージ説明](b37e9dcc4d215ef9d4adeb30111f3c3c.png)
|
38
40
|
|
2
違うエラー文の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -107,3 +107,23 @@
|
|
107
107
|
|
108
108
|
|
109
109
|
ps. laravel側でRedisにどうデータを保存しているかなど、ご希望有りましたら追記いたします。
|
110
|
+
|
111
|
+
追記
|
112
|
+
|
113
|
+
---
|
114
|
+
|
115
|
+
js側にて下記の様に書くと
|
116
|
+
|
117
|
+
```
|
118
|
+
|
119
|
+
{this.state.cart.items}
|
120
|
+
|
121
|
+
```
|
122
|
+
|
123
|
+
▼のエラー(json_decode()して取得しているが、なぞobjectのままなのか。。?)
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
Objects are not valid as a React child (found: object with keys {3, 9}). If you meant to render a collection of children, use an array instead.
|
128
|
+
|
129
|
+
```
|
1
見やすいように書き換え
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,15 +24,15 @@
|
|
24
24
|
|
25
25
|
---
|
26
26
|
|
27
|
+
▼Laravelで下記の様にsession情報を取得し、Reactに渡す。
|
28
|
+
|
27
29
|
```
|
28
30
|
|
29
31
|
$cart = Redis::command('GET', ['cart']);
|
30
32
|
|
31
33
|
```
|
32
34
|
|
33
|
-
▲Laravelで上記の様にsession情報を取得し、Reactに渡す。
|
34
|
-
|
35
|
-
chrome側でconsole.logし取得したデータは以下の通り
|
35
|
+
▼chrome側でconsole.logし取得したデータは以下の通り
|
36
36
|
|
37
37
|
![イメージ説明](b37e9dcc4d215ef9d4adeb30111f3c3c.png)
|
38
38
|
|