Redux Store Tree - dvidale/python-react-group-proj GitHub Wiki
Slices of state
Key |
Slice of State Structure |
Description |
location |
{ city: "", state: "" } |
Stores city and state for location data. |
menuItemRating |
{ createMenuItemRating: {}, getMenuItemRating: {} } |
Manages the ratings for menu items. |
menuItems |
{ allArr: [], itemArr: [] } |
Contains all menu items and specific restaurant items. |
restaurants |
{ AllRestaurants: { }, allCategories: [ ], selectedCategory: "", selectedRestaurant: {} } |
Stores restaurants, categories, and selected restaurant details. |
reviewsList |
{ allReviews: [], createReview: {}, editReview: {}, recentReviews: [], reviewSummary: {}, reviewListArr: [], singleReview: {}, specificReviews: [] } |
Manages all review-related data including creation and fetching. |
session |
{ user: {} } |
Stores the logged-in user's session information. |
shoppingCart |
{ items: [] } |
Manages the items added to the shopping cart. |
Whole state structure
state: {
location: {
city: ""
state: ""
}
menuItemRating: {
createMenuItemRating: {}
getMenuItemRating: {}
}
menuItems: {
allArr: []
itemArr: []
}
restaurants: {
AllRestaurants: { }
allCategories: [ ]
selectedCategory: ""
selectedRestaurant: {}
}
reviewsList: {
allReviews: []
createReview: {}
editReview: {}
recentReviews: []
reviewSummary: {}
reviewListArr: []
singleReview: {}
specificReviews: []
}
session: {
user: {
city: ""
email: ""
first_name: ""
id: 1
last_name: ""
state: ""
username: ""
}
}
shoppingCart: {
items: [ ... ]
}
}