-
Notifications
You must be signed in to change notification settings - Fork 2
Sample State
Tamir Karssli edited this page Feb 26, 2019
·
5 revisions
{
entities: {
users: {
1: {
id: 1,
username: "Tamir",
email: "tkarssli@gmail.com",
followIds: [],
followedIds: [1],
postIds: [1],
commentIds: []
},
2: {
id: 2,
username: "Dorotea",
email: "dorotea@gmail.com",
followIds: [],
followedIds: [1],
likedPostIds: [1],
postIds: [],
commentIds: [1]
}
},
posts: {
1: {
id: 1,
description: "A picture of Tamir doing something super fun",
userId: 1,
likeIds: [2],
commentIds: [1]
}
},
comments: {
1: {
id: 1,
body: "This picture is so amazing because its a picture of Tamir",
userId: 2,
postId: 1,
sequenceId: 1
}
},
},
session: {
{ currentUserId: 25 }
},
ui: {
loading: true/false
},
errors: {
signup: ["Username is already taken", "Password is too short"]
login: ["Incorrect username/password combination"],
postForm: ["Image must be provided"],
commentForm: ["Comment body must not be blank"],
}
}