質問編集履歴
1
誤記
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
従来jsxで書いていたReact.jsのアプリをTypeScriptで書き直したいと思っているのですが、cookieの使い方がわかりません。
|
2
|
-
js-cookie(従来はこれを利用)など試したりもするのですが、すべてundefinedとなります。
|
2
|
+
js-cookie(従来はこれを利用)など試したりもするのですが、すべてundefinedか空白となります。
|
3
3
|
設定等に抜けがありそうな気もするのですが、どうでしょうか。
|
4
4
|
|
5
5
|
参考
|
@@ -27,7 +27,7 @@
|
|
27
27
|
};
|
28
28
|
render() {
|
29
29
|
Cookies.set('myCat', 'Pacman', { path: '/' });
|
30
|
-
|
30
|
+
alertCookie();
|
31
31
|
return (
|
32
32
|
<div>
|
33
33
|
<button type="submit" onClick={() => this.setClick()}>set</button>
|