Skip to content

Sample State

Sadman255 edited this page Dec 16, 2019 · 3 revisions

{
  entities: {
    images: {
      1: {
        id: 5,
        caption: "dummy_text_1",
        user_id: 3,
      },
      2: {
        id: 2,
        caption: "dummy_text_2",
        user_id: 10,
      },
      3: {
        id: 5,
        caption: "dummy_text_3",
        user_id: 15,
      }
    },
    users: {
      5: {
        id: 5,
        bio: "dummy_bio_1",
        username: "Tyrion",
        image_id: [1, 3],
      },
      10: {
        id: 25,
        bio: "dummy_bio_2",
        username: "Arya Stark",
        image_id: [ 2 ],
      }
    },
    likes: {
      1: {
        user_id: 11,
        image_id: 1,
      },
      13: {
        user_Id: 25,
        image_id: 4,
      },
      15: {
        user_id: 25,
        image_id: 3,
      },
    },
    comments: {
      1: {
        user_id: 11,
        image_id: 2,
        body: "Looking good",
      },
      13: {
        user_id: 25,
        image_id: 3,
        body: "This is dope",
      },
      15: {
        user_id: 25,
        image_id: 5,
        body: "Love it",
      },
    },
    followers: {
      1: {
        followed_by_id: 11,
        follows_id: [5, 6, 3, 8, 9],
      },
      13: {
        followed_by_id: 25,
        follows_id: [5, 6, 4, 7, 9],
      },
      15: {
        followed_by_id: 2,
        follows_id: [2, 6, 7, 8, 9],
      },
    }
  },
  ui: {
    loading: true/false
  },
  errors: {
    login: [
      "wrong username/password"
    ],
    image: [
      "image cannot be blank"
    ],
  },
  session: { currentUserId: 25 }
}

Clone this wiki locally