Skip to content

Sample State

Andy Wynkoop edited this page Apr 2, 2018 · 4 revisions

{ entities: { posts: { 1: { id: 1, body: "Test Post Number 1", authorId: 2, photoIds: [] }, 2: { id: 2, body: "App Academy is cool", authorId: 1, photoIds: [] }, 3: { id: 3, body: "I like cheese", authorId: 4, photoIds: [1] }, 4: { id: 4, body: "Wow this clone looks so realistic. I almost feel like I'm on the original site!", authorId: 5, photosIds:[] } }, friends: { //retrieve enough info to display a picture and name for a friend, and link to their page. Fetch addition data on page visit. 2: { id: 2, pageUrl: "CarlyJepson", firstname: "Carly", lastname: "Jepson", profileImgId: 15, } 3: { id: 3, pageUrl: "JerryGarcia", firstname: "Jerry", lastname: "Garcia", profileImgId: 28, }, 4: { id: 4, pageUrl: "RickSanchez", firstname: "Rick", lastname: "Sanchez", profileImgId: 71, }, 5: { id: 5, pageUrl: "AaronWayne", firstname: "Aaron", lastname: "Wayne", profileImgId: 44 } }, chats: { 432: { id: 432, userIds: [1, 2], messages: { 5432: { id: 5432, senderId: 2, body: "Hello!", creationDate: 1522654974944 }, 1201: { id: 1201, senderId: 1, body: "Hey there", creeationDate: 1522654975432 } } open: true } } }, ui: { loading: true/false }, errors: { login: ["Incorrect username/password combination"], }, session: { currentUser: { id: 1, pageUrl: "AndyWynkoop", firstname: "Andy", lastname: "Wynkoop", email: "andywynkoop@gmail.com" bio: "", profileImgId: 152, coverPhotoUrl: 222, friend_ids: [2, 3, 4, 5], chat_ids: [] } } }

Clone this wiki locally