Skip to content

Commit

Permalink
Only log store actions if iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunsaker committed Oct 6, 2018
1 parent 4e77d08 commit ff262c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed

- Moved navigate util to navigation subset
- Only log store actions if iOS

## 1.1.2

Expand Down
4 changes: 3 additions & 1 deletion store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import storage from 'redux-persist/lib/storage';
import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2';
import createSagaMiddleware from 'redux-saga';
import { logger } from 'redux-logger';
import { Platform } from 'react-native';

import reducers from '../reducers';
import sagas from '../sagas';
Expand All @@ -15,7 +16,8 @@ const middlewares = [];
const sagaMiddleware = createSagaMiddleware();
middlewares.push(sagaMiddleware);

if (__DEV__) {
// Only log store actions if dev and iOS
if (__DEV__ && Platform.OS === 'ios') {
middlewares.push(logger);
}

Expand Down

0 comments on commit ff262c9

Please sign in to comment.