* refactor: Remove deprecated APIs * bump mobx-react for hooks support * inject -> useStores https://mobx-react.js.org/recipes-migration\#hooks-to-the-rescue * chore: React rules of hooks lint
9 lines
230 B
JavaScript
9 lines
230 B
JavaScript
// @flow
|
|
import { MobXProviderContext } from "mobx-react";
|
|
import * as React from "react";
|
|
import RootStore from "stores";
|
|
|
|
export default function useStores(): typeof RootStore {
|
|
return React.useContext(MobXProviderContext);
|
|
}
|