https://github.com/maxmellon/redux-action-timing-middleware
:fire: A redux middleware is inject marker to performance profile.
https://github.com/maxmellon/redux-action-timing-middleware
Last synced: 4 months ago
JSON representation
:fire: A redux middleware is inject marker to performance profile.
- Host: GitHub
- URL: https://github.com/maxmellon/redux-action-timing-middleware
- Owner: MaxMEllon
- License: mit
- Created: 2018-10-10T17:22:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2026-02-17T21:37:40.000Z (4 months ago)
- Last Synced: 2026-02-18T03:25:29.720Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 694 KB
- Stars: 31
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redux-action-timing-middleware


> Add marker of redux-action to User Timing in profile.
Installation
---
```bash
$ npm i --save-dev redux-action-timing-middleware
# or
$ yarn add --dev redux-action-timing-middleware
```
Usage
---
```javascript
import { applyMiddleware, compose, createStore } from "redux";
import actionTiming from "redux-action-timing-middleware"
const createReduxStore = (reducer, initialState) => {
const middlewares = [
// Please put top in middleware list.
actionTiming(),
middlewareA,
middlewareB
]
return createStore(
reducer,
initialState,
compose(applyMiddleware(...middlewares))
)
}
export default createReduxStore
```
Option
---
- actionTiming(enable: boolean = true): void
Please set NODE_ENV to arguments, if you use only development
```javascript
const middlewares = [
// Please put top in middleware list.
actionTiming(process.env.NODE_ENV === 'development'),
middlewareA,
middlewareB
]
```
LICENSE
---
Licensed under the MIT License.