sample state - Patrick-Mondala/facebook-clone GitHub Wiki
{
entities: {
users: {
1: {
id: 1,
first_name: "Patrick",
last_name: "Mondala",
email: "[email protected]",
birth_date: "2001-07-03",
gender: "male",
bio: "whats a facebook?",
location: "California",
current_city: "Sacramento",
hometown: "Chicago",
workplace: "App Academy",
education: "App Academy",
authoredPostIds: [1],
timelinePostIds: [1, 2],
likedPostIds: [2],
likedCommentIds: [1],
friendRequestIds: [2,5]
friendIds: [2]
}
}
posts: {
1: {
id: 1,
author_id: 1,
timeline_owner_id: 1,
mediaUrl: "mediahostingsite.com/medialink"
body: "This is the very first post!",
commentIds: [1,2],
userPostLikeIds: [1,2,3,4]
}
}
comments: {
1: {
id: 1,
body: "A comment of comments, the first comment!",
authorId: 1,
postId: 1,
parentCommentId: null,
childCommentIds: [2],
userCommentLikeIds: [1,3,4]
}
}
}
ui: {
loading: true/false
}
errors: {
login: ["Incorrect username/password combination"],
signupForm: ["Email already in use"/"Password too short"],
postForm: ["Post body cannot be blank"],
commentForm: ["Comment body cannot be blank"]
},
session: { id: 9 }
}