-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
rkoron007 edited this page Apr 2, 2018
·
8 revisions
{
entities: {
comments: {
1: {
id: 1,
body: "Good Item! Loved the nautical theme.",
authorId: 13,
rating: 4.5,
itemId: 1,
},
2: {
id: 2,
body: "Bad. No.",
authorId: 2,
rating: 1.5,
itemId: 1,
}
}
users: {
13: {
id: 13,
username:"GoodPerson",
imgUrl:"cool_dude.jpeg"
}
2:{
id: 2,
username:"Party231",
imgUrl:"funnythings.jpeg"
}
}
items: {
1: {
id: 1,
userId: 4,
imgUrl:"pictureofaboat.jpeg",
price: 1600
description:"Boat for Boating",
title:"Solid gold boat!",
averageRating: 3.5,
commentIds: [1,2],
}
}
shoppingCart: {
89: {
id: 89,
itemId: 44,
quantity: 13,
}
}
}
ui: {
loading: true/false
},
errors: {
login: ["Incorrect Login Credentials"],
reviewForm: ["Body cannot be blank", "Choose a rating"],
},
session: {
currentUser: {
id: 3,
username: "231loveboats",
imgUrl "funnyboats.jpeg",
}
}
}