mobx-react-lite

  • Version 3.2.1
  • Published
  • 465 kB
  • No dependencies
  • MIT license

Install

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

Overview

Lightweight React bindings for MobX based on React 16.8+ and Hooks

Index

Variables

variable Observer

const Observer: typeof ObserverComponent;

    Functions

    function enableStaticRendering

    enableStaticRendering: (enable: boolean) => void;

      function isObserverBatched

      isObserverBatched: () => boolean;

        function isUsingStaticRendering

        isUsingStaticRendering: () => boolean;

          function observer

          observer: {
          <P extends object, TRef = {}>(
          baseComponent: any,
          options: IObserverOptions & { forwardRef: true }
          ): any;
          <P extends object>(baseComponent: any, options?: IObserverOptions): any;
          <C extends unknown, Options extends IObserverOptions>(
          baseComponent: C,
          options?: Options
          ): Options extends { forwardRef: true }
          ? C extends any
          ? any
          : never
          : C & { displayName: string };
          };

            function Observer

            Observer: typeof ObserverComponent;

              function observerBatching

              observerBatching: (reactionScheduler: any) => void;

                function useAsObservableSource

                useAsObservableSource: <TSource extends object>(current: TSource) => TSource;

                  function useLocalObservable

                  useLocalObservable: <TStore extends Record<string, any>>(
                  initializer: () => TStore,
                  annotations?: any
                  ) => TStore;

                    function useLocalStore

                    useLocalStore: {
                    <TStore extends Record<string, any>>(initializer: () => TStore): TStore;
                    <TStore extends Record<string, any>, TSource extends object>(
                    initializer: (source: TSource) => TStore,
                    current: TSource
                    ): TStore;
                    };

                      function useObserver

                      useObserver: <T>(fn: () => T, baseComponentName?: string) => T;

                        function useStaticRendering

                        useStaticRendering: (enable: boolean) => void;

                          Interfaces

                          interface IObserverOptions

                          interface IObserverOptions {}

                            property forwardRef

                            readonly forwardRef?: boolean;

                              Package Files (8)

                              Dependencies (0)

                              No dependencies.

                              Dev Dependencies (2)

                              Peer Dependencies (2)

                              Badge

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

                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/mobx-react-lite.

                              • Markdown
                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/mobx-react-lite)
                              • HTML
                                <a href="https://www.jsdocs.io/package/mobx-react-lite"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>