-
Notifications
You must be signed in to change notification settings - Fork 0
sample state
Kevin Chen edited this page Mar 27, 2022
·
14 revisions
entities: {
post: {
1: {
id: 1,
authorId: 2,
petName: "Coyote",
petAge: 1,
petBreed: Husky,
petGender: F,
dogOrCat: "dog",
},
2: {
id: 2,
authorId: 6,
petName: "Nugget"
petAge: 3,
petBreed: Corgi,
petGender: M,
dogOrCat: "dog",
},
3: {
id: 3,
authorId: 36,
petName: "Mango",
petAge: 10,
petBreed: Yorkshire Terrier,
petGender: M,
dogOrCat: "dog",
}
},
users: {
27: {
id: 27,
username: "cat_lover",
email: "cat_lover@mail.com",
},
36: {
id: 36,
username: "dog_lover",
email: "dog_lover@mail.com",
}
},
favorites: {
1: {
id: 1,
userId: 27,
postId: 3
}
},
messages: {
1: {
id: 1,
body: "Hello, I am interested in adopting Mango!"
userId: 27,
receiverId: 36,
}
},
},
ui: {
loading: true/false,
modal: true/false
},
errors: {
login: ["Incorrect username/password combination"],
postForm: ["Post pet_name, pet_age, pet_breed, pet_gender cannot be blank"],
},
session: { currentUserId: 27 }
}