Files
outline/app/hooks/useStores.ts
Tom Moor 084490ba6b chore: Remove React in scope requirement (#9261)
* Add rules

* codemod: update-react-imports

* Update babelrc
2025-05-20 19:26:11 -04:00

13 lines
353 B
TypeScript

import { MobXProviderContext } from "mobx-react";
import { useContext } from "react";
import 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;
}