-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:Add storeToRefs Nuxt auto import
- Loading branch information
1 parent
4b9d813
commit d37366e
Showing
2 changed files
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
// import { storeToRefs } from "pinia" | ||
|
||
export const useTestStore = defineStore('test', () => { | ||
console.log('I was defined within a store directory') | ||
|
||
// Should work without any error or importing | ||
const { count, getCount } = storeToRefs(useCounter()) | ||
console.log('storeToRefs works without importing (Nuxt) !', count.value === getCount.value) | ||
|
||
return {} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters