Skip to content

Sample State Shape

kangaree edited this page Jan 18, 2019 · 14 revisions

Sample State Shape

{
  entities: {
    users: {
      1: {
        id: 1,
        username: 'BabyBlue',
        email: 'walter.white@caltech.edu'
        }
      },
      3: {
        id: 3,
        username: 'JesseP1nk',
        }
      },
      4: {
        id: 4,
        username: 'gus',
        }
      },
      8: {
        id: 8,
        username: 'TUCO_SALAMANCA_LIVES',
        }
      },
    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 and release tension.',
        score: 5,
        authorId: 3,
      },
      2: {
        id: 3,
        title: 'Not Good',
        body: 'I stopped watching after season two.',
        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: 4
      },
    },
    listings: {
      1: {
        id: 1,
        showId: 42,
        listId: 1
        },
      4: {
        id: 4,
        showId: 42,
        listId: 10
      },
      23: {
        id: 23,
        showId: 42,
        listId: 32
      },
    },
    watchStatuses: {
    1: {
      id: 1,
      showId: 42,
      userId: 1,
      readStatus: 'watched'
      }
    },
  },
  ui: {
  loading: true/false
  },
  errors: {
  login: ["\"I AM THE ONE WHO KNOCKS\" — Heisenberg, Breaking Bad. No matching account."],
  },
  session: { currentUserId: 1 }
}

Clone this wiki locally