Search⌘ K
AI Features

The measureMiddleware

Explore how to create and organize Redux middleware that measures execution time of actions with console.time and console.timeEnd. Understand how this helps detect slow reducers and integrates into the Redux store.

We'll cover the following...

Our time-measuring middleware looks like this:

const measureMiddleware = () => next => action => {
   console.time(action.type);
  
...