Pinia store là reactive object — destructuring trực tiếp sẽ mất reactivity (tương tự reactive()). storeToRefs() convert state và getters thành refs để destructure an toàn: const { count, name } = storeToRefs(store).
- Methods (actions) không cần
storeToRefs— destructure thường:const { increment } = store.
Pitfall: nếu dùng storeToRefs với methods, chúng trở thành refs — không gọi được như function.