File tree 2 files changed +8
-4
lines changed
mobile/ReactNativeTutorial/app
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import { call, put } from 'redux-saga/effects';
3
3
4
4
import { actions as reduxActions } from '../../../reducers'
5
5
6
- const FETCH = 'COMMENTS:FETCH' ;
7
- const UPDATE_FORM = 'COMMENTS:UPDATE_FORM' ;
6
+ const FETCH = 'SAGA: COMMENTS:FETCH' ;
7
+ const UPDATE_FORM = 'SAGA: COMMENTS:UPDATE_FORM' ;
8
8
9
9
function * fetchHandler ( ) {
10
10
// try {
Original file line number Diff line number Diff line change 1
1
export default function logger ( { getState } ) {
2
2
return next => action => {
3
- console . info ( 'will dispatch action' , action ) ;
3
+ if ( / ^ S A G A / i. test ( action . type ) ) {
4
+ console . info ( `Executing saga action %c${ action . type } ` , 'color: #0C0CD6' ) ;
5
+ return next ( action ) ;
6
+ }
7
+ console . info ( 'Executing redux action' , action ) ;
4
8
const result = next ( action ) ;
5
9
const state = getState ( ) ;
6
- console . info ( 'state after dispatch' , state . toJS ( ) ) ;
10
+ console . info ( 'State after dispatch' , state . toJS ( ) ) ;
7
11
return result ;
8
12
} ;
9
13
}
You can’t perform that action at this time.
0 commit comments