@@ -31,12 +31,12 @@ Wraps an action creator so that its return value is the payload of a Flux Standa
3131Example:
3232
3333``` js
34- let increment = createAction (' INCREMENT ' , amount => amount);
34+ let noop = createAction (' NOOP ' , amount => amount);
3535// same as
36- increment = createAction (' INCREMENT ' );
36+ noop = createAction (' NOOP ' );
3737
38- expect (increment (42 )).to .deep .equal ({
39- type: ' INCREMENT ' ,
38+ expect (noop (42 )).to .deep .equal ({
39+ type: ' NOOP ' ,
4040 payload: 42
4141});
4242```
@@ -48,11 +48,11 @@ redux-actions will automatically set ```action.error``` to true.
4848Example:
4949
5050``` js
51- const increment = createAction (' INCREMENT ' );
51+ const noop = createAction (' NOOP ' );
5252
5353const error = new TypeError (' not a number' );
54- expect (increment (error)).to .deep .equal ({
55- type: ' INCREMENT ' ,
54+ expect (noop (error)).to .deep .equal ({
55+ type: ' NOOP ' ,
5656 payload: error,
5757 error: true
5858});
@@ -63,17 +63,17 @@ expect(increment(error)).to.deep.equal({
6363Example:
6464
6565``` js
66- const increment = createAction (' INCREMENT' );
66+ const noop = createAction (' INCREMENT' );
6767
6868// As parameter in handleAction:
69- handleAction (increment , {
69+ handleAction (noop , {
7070 next (state , action ) {... },
7171 throw (state, action) {... }
7272});
7373
7474// As object key in handleActions:
7575const reducer = handleActions ({
76- [increment ]: (state , action ) => ({
76+ [noop ]: (state , action ) => ({
7777 counter: state .counter + action .payload
7878 })
7979}, { counter: 0 });
0 commit comments