• Version 9.1.1
  • Published
  • 650 kB
  • 1 dependency
  • MIT license


npm i mobx-react
yarn add mobx-react
pnpm add mobx-react


React bindings for MobX. Create fully reactive components.



variable PropTypes

const PropTypes: {
observableArray: React.Requireable<any>;
observableArrayOf: any;
observableMap: React.Requireable<any>;
observableObject: React.Requireable<any>;
arrayOrObservableArray: React.Requireable<any>;
arrayOrObservableArrayOf: any;
objectOrObservableObject: React.Requireable<any>;


    function disposeOnUnmount

    disposeOnUnmount: {
    (target: React.Component<any, any>, propertyKey: PropertyKey): void;
    <TF extends Disposer | Disposer[]>(
    target: React.Component<any, any>,
    fn: TF
    ): TF;
    • Deprecated

      disposeOnUnmount is not compatible with React 18 and higher.

    function inject

    inject: {
    (...stores: string[]): <T extends unknown>(
    target: T
    ) => T & (T extends any ? IWrappedComponent<P> : never);
    S extends IValueMap = {},
    P extends IValueMap = {},
    I extends IValueMap = {},
    C extends IValueMap = {}
    fn: IStoresToProps<S, P, I, C>
    ): <T extends unknown>(target: T) => T & IWrappedComponent<P>;
    • higher order component that injects stores to a child. takes either a varargs list of strings, which are stores read from the context, or a function that manually maps the available stores from the context to props: storesToProps(mobxStores, props, context) => newProps

    Type Aliases

    type IWrappedComponent

    type IWrappedComponent<P> = {
    wrappedComponent: IReactComponent<P>;

      Package Files (5)

      Dependencies (1)

      Dev Dependencies (3)

      Peer Dependencies (2)


      To add a badge like this badgeto your package's README, use the codes available below.

      You may also use to create a custom badge linking to

      • Markdown
      • HTML
        <a href=""><img src="" alt=""></a>