回答編集履歴
1
追記
test
CHANGED
@@ -48,7 +48,16 @@
|
|
48
48
|
import { useAlertStore } from '../store/alert';
|
49
49
|
const alertStore = useAlertStore(pinia);
|
50
50
|
```
|
51
|
+
またはこう
|
52
|
+
```
|
53
|
+
import { setActivePinia } from 'pinia'
|
54
|
+
import pinia from '../store'
|
55
|
+
setActivePinia(pinia)
|
56
|
+
import { useAlertStore } from '../store/alert';
|
57
|
+
const alertStore = useAlertStore();
|
58
|
+
```
|
59
|
+
|
51
|
-
以下だとうまく行かない
|
60
|
+
以下とかだとうまく行かない
|
52
61
|
```
|
53
62
|
import { createPinia } from 'pinia'
|
54
63
|
const pinia = createPinia()
|