Files
outline/app/hooks/useStores.ts
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

13 lines
358 B
TypeScript

import { MobXProviderContext } from "mobx-react";
import { useContext } from "react";
import type RootStore from "~/stores";
/**
* Hook to access the MobX stores from the React context.
*
* @returns The root store containing all application stores
*/
export default function useStores() {
return useContext(MobXProviderContext) as typeof RootStore;
}