Skip to content

Commit

Permalink
refactor example store
Browse files Browse the repository at this point in the history
  • Loading branch information
yuheiy committed Nov 18, 2023
1 parent 3f5acd5 commit b1aa552
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scripts/stores/example.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Alpine from 'alpinejs';

const name = 'example';

const dataContext = {
const data = {
count: 0,

init() {
Expand All @@ -16,10 +16,10 @@ const dataContext = {
},
};

Alpine.store(name, dataContext);
Alpine.store(name, data);

declare module 'alpinejs' {
interface Stores {
[name]: typeof dataContext;
[name]: typeof data;
}
}

0 comments on commit b1aa552

Please sign in to comment.