Skip to content

Sample State Shape

kangaree edited this page Jan 17, 2019 · 14 revisions

Sample State Shape

{
entities: {
    users: {
        1: {
            id: 1,
            username: 'babyblue',
            email: 'walter.white@caltech.edu'
            }
        },
    shows: {
        42: {
            id: 42,
            title: 'Breaking Bad',
            year: 2008,
            genre: "DRAMA",
            rating: 4.7,
            service: "AMC"
        }
    },
    reviews: {
        1: {
            id: 1,
            title: 'FeLiNa (Spoilers!)',
            body: 'I can understand the criticisms- it is not graceful or intense like some of the best eps, there were no huge surprises, and maybe more damning, Walt "won". But it worked for me.',
            score: 4,
            authorId: 1,
        },
        2: {
            id: 2,
            title: 'No Spoilers',
            body: 'This show makes me very stressed, but in a good way- like a roller coaster. It knows how to build tension.',
            score: 5,
            authorId: 3,
        },
        2: {
            id: 3,
            title: 'Not Good',
            body: 'Better Call Saul is better.',
            score: 1,
            authorId: 8,
        },
    lists: {
        1: {
            id: 1,
            name: 'Top Ten',
            creatorId: 1
            },
        10: {
            id: 10,
            name: 'Good Dramas',
            creatorId: 3
        },
        32: {
            id: 32,
            name: 'The Best Hour Long Dramas',
            creatorId: 3
        }
    },
    listings: {
        1: {
            id: 1,
            showId: 42,
            listId: 1
            },
        4: {
            id: 4,
            showId: 42,
            listId: 10
        },
        23: {
            id: 23,
            showId: 42,
            listId: 32
        }
    },
    showsUsers: {
    1: {
        id: 1,
        showId: 42,
        userId: 1,
        readStatus: 'watched'
        }
    },
    ui: {
    loading: true/false
    },
    errors: {
    login: ["\"We've got a situation.\" — Mike \"the Situation\" Sorrentino, Jersey Shore. No matching account."],
    },
    session: { currentUserId: 1 }
}

Clone this wiki locally