-
Notifications
You must be signed in to change notification settings - Fork 0
Redux State Shape
Krista Strucke edited this page Jun 25, 2022
·
1 revision
var store = {
session: {},
events: {
eventId: {
eventData,
user: (userData of host),
categoryType: "category string",
venueId
},
optionalOrderedList: []
},
tickets: {
ticketId: {
ticketData,
user: {userData of who booked ticket},
event: { eventData for this event }
},
optionalOrderedList: []
}
}
notes:
-query venue and include event, nest include category but alias as lowercase category and use attributes array to only return one column: type -tickets is mainly related to user so makes sense to make it it's own slice of state