Skip to content

Commit 50a2b70

Browse files
authored
Update README.md
A more readable reduce for the batching reducer
1 parent 6492c4d commit 50a2b70

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,7 @@ import createLogger from 'redux-logger';
232232

233233
const actionTransformer = action => {
234234
if (action.type === 'BATCHING_REDUCER.BATCH') {
235-
action.payload.type = action.payload.reduce((result, next) => {
236-
const prefix = result ? result + ' => ' : '';
237-
return prefix + next.type;
238-
}, '');
239-
235+
action.payload.type = action.payload.map(result => result.type).join(' => ');
240236
return action.payload;
241237
}
242238

0 commit comments

Comments
 (0)