mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
* Add JSDoc to hooks in app/hooks directory * lint --------- Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom.moor@gmail.com>
13 lines
355 B
TypeScript
13 lines
355 B
TypeScript
import { MobXProviderContext } from "mobx-react";
|
|
import * as React 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 React.useContext(MobXProviderContext) as typeof RootStore;
|
|
}
|