-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
Dan Lay edited this page Oct 3, 2022
·
5 revisions
{
entities: {
videos: {
1: {
id: 1,
title: "State Your Business",
description: "this is a video about me trying not to mess up my state",
uploaderId: 4
},
2: {
id: 2,
title: "I Love Spinning in Circles, WATCH!",
description: "sooooooo dizzzzyyyyyy",
uploaderId: 13
},
3: {
id: 3,
title: "Cooking with your Feet",
description: "much harder than you'd think...",
uploaderId: 5
}
},
users: {
4: {
id: 4,
username: "coding_and_crying45"
},
5: {
id: 5,
username: "masterCH3F"
},
13: {
id: 13,
username: "circlelover000"
}
},
comments: {
1: {
id: 1,
body: "um, actually, squares are better, idiot",
commenterId: 5,
videoId: 2
},
2: {
id: 2,
body: "this is what i look like when writing my code",
commenterId: 1,
videoId: 2
},
3: {
id: 3,
body: "i would love to make a pizza with MY feet!",
commenterId: 13,
videoId: 3
}
},
videoFeelings: {
1: {
id: 1,
feelerId: 4,
videoId: 2,
isLike: true/false
},
2: {
id: 2,
feelerId: 5,
videoId: 3,
isLike: true/false
}
},
commentFeelings: {
1: {
id: 1,
feelerId: 13,
commentId: 1,
isLike: true/false
},
2: {
id: 2,
feelerId: 4,
commentId: 3,
isLike: true/false
}
}
},
ui: {
loading: true/false,
modal: true/false,
theme: "dark"/"light"
},
errors: {
login: ["Incorrect username or password"],
videoForm: ["Title can not be blank"],
commentForm: ["Body can not be blank"],
},
session: { currentUserId: 2 }
}