Skip to content

Sample State

AlbertgitC edited this page Oct 10, 2019 · 3 revisions
{
  entities: {
    feeds: {
      1: {
        id: 1,
        imgUrl: "https://something1.jpg",
        body: "something about picture1",
        authorId: 11,
        commentIds: [2]
      },
      2: {
        id: 2,
        imgUrl: "https://something2.jpg",
        body: "another about picture2",
        authorId: 25
        commentIds: [1, 3],
        likerIds: [11, 25]
      },
      3: {
        id: 3,
        imgUrl: "https://something3.jpg",
        body: "just random stuff",
        authorId: 11,
        likerIds: [25]
      }
    },
    users: {
      11: {
        id: 11,
        username: "user01albert",
        email: "user01email@email.com",
        authoredFeedIds: [1, 3],
        profilePic: "https://user02picture.jpg",
        followerIds: [25],
        followedUserIds: [25]        
      },
      25: {
        id: 25,
        username: "user02mary",
        email: "user02email@email.com",
        authoredFeedIds: [2],
        profilePic: "https://user02picture.jpg",
        followerIds: [11],
        followedUserIds: [11]
      }
    },
    comments: {
      1: {
        id: 1,
        body: "stuff about feed2",
        likerIds: [25]
      },
      2: {
        id: 2,
        body: "stuff about feed1"
      },
      3: {
        id: 3,
        body: "other stuff about feed2"
      }
    }
  },
  ui: {
    loading: true/false
  },
  errors: {
    login: ["Incorrect username/password combination"],
    feedForm: ["feed imgUrl cannot be blank"],
  },
  session: { currentUserId: 25 }
}

Clone this wiki locally