Closed oztrkmrt closed 2 months ago
[x] Install and initialize Redux with Redux Thunk, Logger middleware
redux
react-redux
redux-thunk
logger
store
[x] Create Reducers with only basic set actions, reducers should have exact same structure below:
[x] Client Reducer:
{Object}
{Object Array}
{String}
[x] Client Reducer Actions:
[] Product Reducer:
{Number}
{Number} | 25 by default
{Number} | 0 by default
{String} | "NOT_FETCHED" by default | one of "NOT_FETCHED" , "FETCHING", "FETCHED", "FAILED"
[] Product Reducer Actions:
[x] ShoppingCart reducer
cart: {Object Array} will keep products are being bought
[ { count: 1, product: { id: “1235”, … } }, { count: 3, product: { id: “1236”, … } }, ]
payment {Object} will keep payment information
address {Object} will keep address information
[x] ShoppingCart Reducer Actions
[x] Code action creators for those reducers and each field above
action creators
[x] Create thunk action creator to get roles and put it in store. NOTE: It should be triggered only in case of need!
thunk action creator
roles
[x] Install and initialize Redux with Redux Thunk, Logger middleware
redux
,react-redux
andredux-thunk
,logger
middleware librariesstore
object[x] Create Reducers with only basic set actions, reducers should have exact same structure below:
[x] Client Reducer:
{Object}
all about user{Object Array}
address list of the user{Object Array}
credit card list of the user{Object Array}
{String}
{String}
[x] Client Reducer Actions:
[] Product Reducer:
{Object Array}
{Object Array}
{Number}
number of total products{Number} | 25 by default
product count on the page{Number} | 0 by default
for pagination{String}
{String} | "NOT_FETCHED" by default | one of "NOT_FETCHED" , "FETCHING", "FETCHED", "FAILED"
[] Product Reducer Actions:
[x] ShoppingCart reducer
cart:
{Object Array}
will keep products are being boughtpayment
{Object}
will keep payment informationaddress
{Object}
will keep address information[x] ShoppingCart Reducer Actions
[x] Code
action creators
for those reducers and each field above[x] Create
thunk action creator
to getroles
and put it in store. NOTE: It should be triggered only in case of need!