reactive works while ref not work in pinia setup mode #2839
Replies: 2 comments 1 reply
-
This is because nickname is a primitive while menuList is an object. Object retains reactivity. Note you can directly use |
Beta Was this translation helpful? Give feedback.
0 replies
-
I tested with const tttt = ref([]) and it does not work with const {tttt} = store. I am afraid of this beacause it may change in future, then I can not use reactive again. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reproduction
1
Steps to reproduce the bug
const nickname = ref('')
const menuList = reactive([])
in vue file,use {nickname, menuList} = store.
the nickname will be always the first value, but the menulist can be reactivity.
Expected behavior
both can be reactivity
Actual behavior
the nickname will be always the first value, but the menulist can be reactivity.
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions