-
Notifications
You must be signed in to change notification settings - Fork 0
Sample State
Josh Bubar edited this page Dec 3, 2020
·
7 revisions
This is a sample of how the state might be in the front end of the app
{
entities: {
users: {
1: {
id: 1,
fullName: "Baruch Spinoza",
email: "baruchspi@truth.com",
},
2: {
id: 2,
fullName: "Martin Buber",
email: "tinobuber@aol.com",
},
3: {
id: 3,
fullName: "Hannah Arendt",
email: "HannahA@wat.com",
},
},
team:{
1:{
id: 1,
name: "thinkers"
},
projects: {
1: {
id: 1,
name: "Prove that people are good",
dueDate: "Wed Dec 02 2021 22:43:20 GMT-0800 (Pacific Standard Time)",
},
2: {
id: 2,
username: "Define other",
description:
"This project is for the purpose of understanding everything that is not me or you if you call yourself me too",
},
},
sections: {
6: {
id: 6,
body: "To do",
authorId: 2,
projectId: 2,
},
8: {
id: 8,
body: "Done",
authorId: 2,
projectId: 2,
},
},
tasks: {
12: {
id: 12,
body: "Write an important book on truth",
assigneeId: 1,
sectionId: 8,
},
13: {
id: 13,
body: "Have some quiet time",
assigneeId: 2,
sectionId: 6,
},
},
}
ui: {
loading: true / false,
modal: true / false,
},
errors: {
login: ["Incorrect username/password combination"],
chirpForm: ["Chirp body cannot be blank"],
},
session: { currentUserId: 25 },
};...more coming soon
Inspired by Bluebird wiki