Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1x 1x 1x 2x 2x 1x | import { create } from "zustand";
import { HubFacadeStore } from "~/types/HubFacadeStore";
import HubFacade from "~/modules/services/HubFacade";
/**
* A Zustand store for managing the hub service.
*
* The store provides functionality to retrieve the HubFacade instance (`_service`)
* and expose it through the `getService` function. The `HubFacade` is initialized
* with the state of the devices, token, and socket connection stores passed as
* dependencies.
*
*/
export const useHubFacadeStore = create<HubFacadeStore>((_, get) => ({
_service: new HubFacade(),
getService: () => get()._service,
}));
|