Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

phucprime/order_food

Repository files navigation

Order Food App

Expo project

Redux thunk

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-thunk

Then, 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))

The connect() function connects a React component to a Redux store

function connect(mapStateToProps?, mapDispatchToProps?, mergeProps?, options?)

Get Location & Home Screen

Sign Up & Verify OTP

Log Out & Log In

Add to cart & Update cart

Apply Promotion

Proceed Payment & Create Order

Order details & Cancel

End of section.

Releases

No releases published

Packages

No packages published