Skip to content

Store Shape

Josh Salcido edited this page Jun 24, 2022 · 3 revisions

Store Shape v1 Basic Layout

store = {
    session: {},
    spots: {
        spotId: {
            spotData,
            reviews:{
                reviewId: {
                        reviewData,
                        user: {userData for who reviewed}
                    }
            },
            images: {normalizedImageData}
        },
        optionalOrderedList: []
    }
}

If Store Shape v1 Basic Layout complete (optional):

store = {
    session: {},
    spots: {
        spotId: {
            spotData,
            reviews:{
                reviewId: {
                        reviewData,
                        user: {userData for who reviewed}
                    }
            },
            images: {normalizedImageData}
        },
        optionalOrderedList: []
    }
    bookings: {
        bookingId: {
            bookingData,
            user: {userData of user that booked}.
            spot: {spotData for the booking}
        },
        optionalOrderedList: []
    }
}

Clone this wiki locally