Skip to content

Commit bde0e5a

Browse files
committed
refactor: Update store implementation
1 parent 90587cb commit bde0e5a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

frontend/src/stores/haStore.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Manages state and actions for Home Assistant entity control and configuration.
55
*/
66

7-
import { create } from 'zustand';
7+
import { createStore } from 'zustand/vanilla';
88

99
// ============================================================================
1010
// Types
@@ -49,7 +49,7 @@ interface HAStore {
4949
// Store Implementation
5050
// ============================================================================
5151

52-
export const useHAStore = create<HAStore>((set, get) => ({
52+
export const haStore = createStore<HAStore>((set, get) => ({
5353
// Initial state
5454
available: false,
5555
loading: false,
@@ -244,3 +244,6 @@ export const useHAStore = create<HAStore>((set, get) => ({
244244
set({ error });
245245
}
246246
}));
247+
248+
// Export a convenience function to match the previous API
249+
export const useHAStore = haStore;

0 commit comments

Comments
 (0)