Closed Rednas83 closed 8 months ago
Not applicable
useUserStore.ts
export const useUserStore = defineStore("user", () => { const name = ref("pinia") const level = ref(1) const debug = ref(true) const diagnostics = ref(false) return { name, level, debug, diagnostics } })
app.vue
const user = useUserStore() user.$state = { name: popup.identifier, level: 1, debug: false, diagnostics: false }
OR
const user = useUserStore() user.$patch({ name: popup.identifier, level: 1, debug: false, diagnostics: false })
No compile errors. Was there a breaking change? This code worked before
$state $patch
package.json devDependencies:{ "@antfu/eslint-config": "2.4.5", "eslint": "^8.55.0", "nuxt": "^3.8.2", } "dependencies": { "@pinia/nuxt": "^0.5.1", "pinia": "^2.1.7", }
Reproduction
Not applicable
Steps to reproduce the bug
useUserStore.ts
app.vue
OR
Expected behavior
No compile errors. Was there a breaking change? This code worked before
Actual behavior
$state
$patch
![image](https://github.com/vuejs/pinia/assets/25219229/fac0bf66-803e-4bb3-acad-c070593e083b)
Additional information
package.json devDependencies:{ "@antfu/eslint-config": "2.4.5", "eslint": "^8.55.0", "nuxt": "^3.8.2", } "dependencies": { "@pinia/nuxt": "^0.5.1", "pinia": "^2.1.7", }