Finished chapter 12
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import Reactotron from "reactotron-react-native";
|
||||
import { reactotronRedux } from "reactotron-redux";
|
||||
|
||||
//if (process.env.NODE_ENV === "development") {
|
||||
const reactotron = Reactotron.configure({
|
||||
port: 9090,
|
||||
host: "192.168.1.200"
|
||||
@@ -13,15 +12,12 @@ const reactotron = Reactotron.configure({
|
||||
ignoreUrls: /\/logs$/
|
||||
}
|
||||
})
|
||||
// .use(asyncStorage()) // FK: IS THIS NEEDED??
|
||||
// .use(networking())
|
||||
.use(
|
||||
reactotronRedux({
|
||||
isActionImportant: action => action.type.includes("success")
|
||||
})
|
||||
)
|
||||
.connect();
|
||||
//}
|
||||
|
||||
Reactotron.log("A knick-knack is a thing that sits on top of a whatnot");
|
||||
Reactotron.warn("If you must make a noise, make it quietly");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { createStore, applyMiddleware } from "redux";
|
||||
import thunk from "redux-thunk";
|
||||
import { composeWithDevTools } from "redux-devtools-extension"; // decia remote-redux-devtools-sp
|
||||
import { composeWithDevTools } from "redux-devtools-extension";
|
||||
|
||||
import { reducer } from "./world.reducer";
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ export const getCountries = () => async dispatch => {
|
||||
const result = await getCountriesAPI();
|
||||
dispatch(countriesSuccess(result.data));
|
||||
} catch (e) {
|
||||
console.error("getCountries: failure!");
|
||||
dispatch(countriesFailure());
|
||||
}
|
||||
};
|
||||
@@ -95,9 +96,11 @@ export const getRegions = (country: string) => async dispatch => {
|
||||
const result = await getRegionsAPI(country);
|
||||
dispatch(regionsSuccess(result.data));
|
||||
} catch (e) {
|
||||
console.error("getRegions: failure with API!");
|
||||
dispatch(regionsFailure());
|
||||
}
|
||||
} else {
|
||||
console.error("getRegions: failure, no country!");
|
||||
dispatch(regionsFailure());
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user