mini-store

  • Version 3.0.6
  • Published
  • 50.1 kB
  • 2 dependencies
  • MIT license

Install

npm i mini-store
yarn add mini-store
pnpm add mini-store

Overview

[![Travis](https://img.shields.io/travis/yesmeck/mini-store.svg?style=flat-square)](https://travis-ci.org/yesmeck/mini-store)

Index

Functions

function connect

connect: <TStateProps = {}, TOwnProps = {}, State = DefaultRootState>(
mapStateToProps?: (state: State, ownProps: TOwnProps) => TStateProps,
options?: ConnectOptions
) => <C extends any>(WrappedComponent: C) => any;

    function create

    create: <S = {}>(initialState: S) => Store<S>;

      Classes

      class Provider

      class Provider extends React.Component<ProviderProps> {}

        method render

        render: () => any;

          Interfaces

          interface Store

          interface Store<S = {}> {}

            property getState

            getState: () => S;

              property setState

              setState: (state: Partial<S>) => void;

                property subscribe

                subscribe: (listener: () => void) => () => void;

                  interface StoreProp

                  interface StoreProp<S = {}> {}

                    property store

                    store: Store<S>;

                      Package Files (5)

                      Dependencies (2)

                      Dev Dependencies (16)

                      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/mini-store.

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