-
Notifications
You must be signed in to change notification settings - Fork 1
Sample State
betty08300 edited this page Jul 30, 2019
·
5 revisions
{
entities: {
users: {
1: {
id: 1,
first_name: Betty,
product_id: 10
},
2: {
id: 2,
first_name: Bob
product_id: 11
}
},
products: {
10: {
id: 10,
user_id: 1,
title: "Coffee Table",
description: "Lift-top coffee table",
who: "I did",
what: "A finished product",
when: "made to order"
price: 30000,
images: ["https://placekitten.com/200/300", "https://placekitten.com/600/900"],
},
11: {
id: 11,
user_id: 2,
title: "Handmade Mug",
description: "Hand crafted with love",
who: "A member of my shop",
what: "A supply or tools to make things",
when: "before 2000"
price: 2000,
images: [
"https://placekitten.com/200/300",
"https://placekitten.com/600/900"
],
}
},
reviews: {
20: {
id: 20,
productId: 11,
userId: 1,
body: "The best purchase I've ever made",
rating: 5
},
21: {
id: 21,
productId: 11,
userId: 2,
body: "Shipping was fast. Product is ok.",
rating: 3
}
},
shoppingCartItems: {
31: {
id: 31,
userId: 1,
productId: 10,
quantity: 1
},
32: {
id: 32,
userId: 1,
productId: 11,
quantity: 1
}
}
},
ui: {
loading: true/false
},
errors: {
login: ["Incorrect username or password"],
productListingForm: ["The title cannot be blank"]
reviewForm: ["You must pick a star rating"]
},
session: { currentUserId: 25 }
}