diff --git a/reactotron.js b/reactotron.js index 7de9b5f..4e8ff1a 100644 --- a/reactotron.js +++ b/reactotron.js @@ -1,8 +1,12 @@ import AsyncStorage from '@react-native-community/async-storage'; -import Reactotron from 'reactotron-react-native' +import Reactotron from 'reactotron-react-native'; +import { reactotronRedux } from 'reactotron-redux'; -Reactotron +const reactotron = Reactotron .setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from .configure() // controls connection & communication settings .useReactNative() // add all built-in react native plugins - .connect(); // let's connect! \ No newline at end of file + .use(reactotronRedux()) + .connect(); + +export default reactotron; \ No newline at end of file diff --git a/src/index.js b/src/index.js index c3cf079..5778911 100644 --- a/src/index.js +++ b/src/index.js @@ -42,6 +42,7 @@ import AppWithNavigationState, { } from 'component/AppNavigator'; import { REHYDRATE, PURGE, persistCombineReducers, persistStore } from 'redux-persist'; import { __ } from 'i18n'; +import reactotron from '../reactotron'; import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api import getStoredStateMigrateV4 from 'redux-persist/lib/integration/getStoredStateMigrateV4'; import FilesystemStorage from 'redux-persist-filesystem-storage'; @@ -179,7 +180,7 @@ const sharedStateCallback = ({ dispatch, getState }) => { const emailVerified = selectUserVerifiedEmail(state); if (syncEnabled && emailVerified) { NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(password => - dispatch(doGetSync(password)) + dispatch(doGetSync(password)), ); } }; @@ -195,7 +196,7 @@ const composeEnhancers = compose; const store = createStore( enableBatching(reducers), {}, // initial state, - composeEnhancers(applyMiddleware(...middleware)) + composeEnhancers(applyMiddleware(...middleware), reactotron.createEnhancer()), ); window.store = store; diff --git a/src/page/search/view.js b/src/page/search/view.js index 10c71b1..77f1024 100644 --- a/src/page/search/view.js +++ b/src/page/search/view.js @@ -71,8 +71,8 @@ class SearchPage extends React.PureComponent { } componentWillReceiveProps(nextProps) { - const { currentRoute, query } = nextProps; - const { currentRoute: prevRoute, search } = this.props; + const { currentRoute, query, isSearching } = nextProps; + const { currentRoute: prevRoute, search, isSearching: prevIsSearching } = this.props; if (Constants.DRAWER_ROUTE_SEARCH === currentRoute && currentRoute !== prevRoute) { this.onComponentFocused();