mirror of
https://github.com/outline/outline.git
synced 2026-11-25 23:24:06 +03:00
13 lines
358 B
TypeScript
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;
|
|
}
|