/** * 接管 store 的生命周期,这个比较轻量,适合在组件中使用。 * 相比渲染器中的 withStore,这里面的 store 不会在一个大树中。 * 而且不会知道父级和子级中还有哪些 store。 */ import React from 'react'; import hoistNonReactStatic from 'hoist-non-react-statics'; import { IAnyStateTreeNode } from 'mobx-state-tree'; export declare function withStore(storeFactory: (props: any) => K): & { store: K; }>>(ComposedComponent: T) => (import("react").ComponentType & hoistNonReactStatic.NonReactStatics, {}>) & { ComposedComponent: T; };