diff --git a/js/enhancers/createFoodItemEnhancers.js b/js/enhancers/createFoodItemEnhancers.js index 66f9859..a99a59c 100644 --- a/js/enhancers/createFoodItemEnhancers.js +++ b/js/enhancers/createFoodItemEnhancers.js @@ -4,6 +4,7 @@ import CreateFoodItem$, { emitter as emitCreateItemState } from '../streams/Crea import { emitter as emitFoodItemsState } from '../streams/FoodItemsStream'; import { createFoodItem } from '../apis/FoodItemsApi'; import FoodItemRecord, { createFoodItem as buildFoodItem } from '../records/FoodItemRecord'; +import Snackbar from 'react-native-snackbar'; // should throw an error if not valid const isFoodItemValid = () => true; @@ -21,6 +22,10 @@ export const withCreateFoodItemState = mapPropsStream(props$ => { // insert new item into db and cast it into FoodItemRecord const newItem = buildFoodItem(await createFoodItem(foodItem)); + Snackbar.show({ + title: foodItem.name + ' added', + }); + // notify food items state of new item emitFoodItemsState(newItem);