-
Notifications
You must be signed in to change notification settings - Fork 1
Sample State
Katrina Lui edited this page Sep 19, 2017
·
2 revisions
{
entities: {
photos: {
1: {
id: 1,
img_url: '36019969065.jpg',
title: 'Black and white photo',
description: 'Monochrome ftw',
owner_id: 7,
comments: ["24", "32"],
albums: ["5", "9"],
tags: ["12", "33", "47"]
}
},
users: {
1: {
id: 1,
username: "avedon"
img_url: '56039469025.jpg',
photos: ["1", "34", "45"],
albums: ["33", "68"]
}
},
comments: {
1: {
id: 1,
body: "Nice shot!",
user_id: 3,
photo_id: 2
}
},
tags: {
1: {
id: 1,
name: "cute"
}
},
albums {
1: {
id: 1,
title: "Cute Animals",
description: "A collection of cute animal photos",
owner_id: 3,
photos: [3, 4, 5, 6, 7]
}
}
},
ui: {
loading: true/false
},
session: {
currentUser: {
id: 37,
username: "avedon",
img_url: '56039469025.jpg'
}
},
errors: {
session: ["Incorrect username and/or password"],
photoForm: ["No photo selected"],
albumForm: ["Title cannot be blank"]
}
}