mobx-state-tree-action-timing-middleware
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

mobx-state-tree-action-timing-middleware

mst-action-timing-middleware is middleware that displays the performance profile of mst action

スクリーンショット 2019-12-21 22 58 56

Created with reference to redux-action-timing-middleware

Installing

$ npm i --save-dev mobx-state-tree-action-timing-middleware
# or
$ yarn add --dev mobx-state-tree-action-timing-middleware

How to use

const Store = types.model({
  UIStore: types.optional(UIStore, {}),
})

export interface IStore extends Instance<typeof Store> {}

const createStore = (snapshot = null): IStore => {
  MobxStore = Store.create()
  if (snapshot) {
    applySnapshot(MobxStore, snapshot)
  }
  // Add actionTiming to middleware
  addMiddleware(MobxStore, actionTiming)
  return MobxStore
}

export default createStore

/mobx-state-tree-action-timing-middleware/

    Package Sidebar

    Install

    npm i mobx-state-tree-action-timing-middleware

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.15 kB

    Total Files

    6

    Last publish

    Collaborators

    • toshi1127