Skip to content

Sample State

jas-singh-code edited this page Mar 15, 2021 · 17 revisions

{

entities: {

users: {
  7: {
    id: 7,
    lastname: "Wangdu"
    firstname: "Phunsuk"       
  },
  13: {
    id: 13,
    lastname: "Sugrim"
    username: "Angelique",
  }
},
posts: {
  1:{
    id: 1
    title: 'hello world',
    message: 'what a lovely day to be on the interweb!',
    poster_id: 3,
    image_url: 'https://picsum.photos/200/300',
    video_url: 
    },
  2:{
    id: 2,
    title: 'why does this app only have old ppl!?',
    message: 'why are there only old people on this app! Also, im secretly in love with user 3!',
    poster_id: 1,
    image_url: 'https://picsum.photos/id/237/200/300',
    video_url:'https://random-ize.com/random-youtube/' 
    },
  3:{
    id:3
    title: 'whats better? a ripe lemon, or a rotten apple?',
    message: 'asking for a friend, but whats worse to eat whole? ripe lemon or rotten apple?',
    poster_id: 5,
    image_url: 'https://picsum.photos/seed/picsum/200/300',
    video_url: 'https://random-ize.com/random-youtube/'
  },
},
comments: {
  1: {
    body: "lemons for sure man",
    commenter_id: 3,
    post_id: 3
  },
  2: {
    body: "you heard of a fridge",
    commenter_id: 2,
    post_id: 3
  },
  3: {
    body: "why are you asing this again",
    commenter_id: 1,
    post_id: 3
  }
},
likes: {
  1: {
    id: 1,
    liker_id: 3,
    post_id: 3
  },
  2: {
    id: 2,
    liker_id: 4,
    post_id: 3
  },
  3: {
    id: 3,
    liker_id: 1,
    post_id: 3
  }
}

}, ui: { loading: true/false, }, errors: { login: ["Incorrect username and/or password"], postForm: ["Post title cannot be blank"], }, session: { currentUserId: 41 } }

Clone this wiki locally