Skip to content

Sample State

grmreyes edited this page Mar 31, 2021 · 3 revisions
{
  entities: {
    users: {
        1: {
            id: 1,
            username: "flix_watcher",
            imgUrl: "sampleimage.jpg",
        },
        2: {
            id: 2,
            username: "couch_potato",
            imgUrl: "potato.jpg",
        },
        3: {
            id: 3,
            username: "popcorn_monster",
            imgUrl: "popcornmonster.jpg",
        }
    },
    movies: {
        5: {
            id: 5,
            title: "Ironman", 
            description: "When Tony Stark, an industrialist, is captured, he constructs a high-tech armoured suit to escape. Once he manages to escape, he decides to use his suit to fight against evil forces to save the world.",
            runtime: "2h 6m",
            rating: "PG-13",
            year: "2008",
        },
        13: {
            id: 13,
            title: "The Dark Knight", 
            description: "After Gordon, Dent and Batman begin an assault on Gotham's organised crime, the mobs hire the Joker, a psychopathic criminal mastermind who offers to kill Batman and bring the city to its knees.",
            runtime: "2h 32m",
            rating: "PG-13",
            year: "2008",
        }
    },
    genres: {
        1: {
            id: 1,
            name: "Action", 
          },
        2: {
             id: 2,
            name: "Comedy", 
        }
      },
    labels: {
      4: {
          id: 4,
          movieId: 5, 
          genreId: 1, 
        },
      5: {
          id: 5,
          movieId: 5, 
          genreId: 2, 
      }
    },
    lists: {
      35: {
          id: 35,
          movieId: 5, 
          userId: 1, 
        },
      36: {
          id: 36,
          movieId: 13, 
          userId: 1, 
      }
    },

  },
  ui: {
    loading: true/false,
    modal: true/false
  },
  errors: {
    login: ["Incorrect username/password combination"],
  },
  session: { currentUserId: 2 }
}
Clone this wiki locally