refactor: split hooks types and utils by domain

This commit is contained in:
Tom Boullay
2026-04-30 11:49:18 +02:00
parent 9ac5844182
commit b1187b68ae
65 changed files with 83 additions and 84 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useSyncExternalStore } from "react";
import { InteractionManager } from "@/managers/InteractionManager";
import type { InteractionSnapshot } from "@/types/interaction/interaction";
const manager = InteractionManager.getInstance();
export function useInteraction(): InteractionSnapshot {
return useSyncExternalStore(
manager.subscribe.bind(manager),
manager.getState.bind(manager),
);
}