Skip to content

Commit

Permalink
Utils: Update dirtying reducer documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Nov 3, 2017
1 parent e9d8a69 commit 4459741
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions editor/utils/dirtying-reducer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import { includes } from 'lodash';

/**
* Reducer enhancer which transforms the result of the original reducer into an
* object tracking its own history (past, present, future).
* Reducer enhancer for tracking changes to reducer state over time. The
* returned reducer will include a new `isDirty` property on the object
* reflecting whether the original reference of the reducer has changed.
*
* @param {Function} reducer Original reducer
* @param {?Object} options Optional options
* @param {?Array} options.resetTypes Action types upon which to clear past
* @param {?Array} options.resetTypes Action types upon which to reset dirty
* @return {Function} Enhanced reducer
*/
export default function dirtyingReducer( reducer, options = {} ) {
Expand Down

0 comments on commit 4459741

Please sign in to comment.