Example in JavaScript

The following is an example of a spySpeakerReducer in JavaScript. The spySpeakerReducer allows you to determine how many times it might have been called.

import { speakerReducer as original_speakerReducer } from './reducers';

export let callCounter = 0;

export function spySpeakerReducer(state, action) {
callCounter++;

return original_speakerReducer(state,action);
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.69.240