Order Coffee React Native Application (Product images: The Coffee House)
Install modules at root directory:
npm install
Install COCOAPODS dependencies at ios directory:
pod install
Start your application. Run the following:
react-native run-ios
Redux Thunk middleware
allows you to write action creators that return a function instead of an action.
The thunk can be used to delay the dispatch of an action, or to dispatch only if
a certain condition is met. The inner function receives the store methods
dispatch and getState as parameters.
npm install redux-thunkThen, to enable Redux Thunk, use
applyMiddleware():
import { createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import rootReducer from './reducers/index'
const store = createStore(rootReducer, applyMiddleware(thunk))function connect(mapStateToProps?, mapDispatchToProps?, mergeProps?, options?)






