-
Notifications
You must be signed in to change notification settings - Fork 3
Sample State
jli57 edited this page Oct 8, 2018
·
4 revisions
{
entities: {
users: {
1: {
id: 1,
firstName: "John",
lastName: "Smith",
email: "[email protected]",
mobileNumber: "",
birthDate: "December 25, 1990",
gender: "M",
},
2: {
id: 2,
firstName: "Jone",
lastName: "Doe",
email: "[email protected]",
mobileNumber: "1234567890",
birthDate: "May 4, 1992",
gender: "M",
},
},
userRelationships: {
1: {
id: 1,
user1_id: 1,
user2_id: 2,
type: "friends"
}
},
posts: {
1: {
id: 1,
author_id: 1,
body: "Hello"
},
2: {
id: 2,
author_id: 2,
body: "What's up"
},
3: {
id: 3,
author_id: 2,
body: "How's the weather"
}
},
comments: {
1: {
id: 1,
author_id: 1,
post_id: 2,
body: "I have no idea"
parent_id: ""
},
2: {
id: 2,
author_id: 2,
post_id: 1,
body: "Oh really?"
parent_id: 1
},
3: {
id: 3,
author_id: 2,
post_id: 2,
body: "Hello"
parent_id: ""
}
},
},
ui: {
loading: true/false
},
session: {
currentUserId: 1
},
errors: {
session: ["Incorrect username/password combination"],
commentForm: ["Comment can't be blank"]
}
}