Skip to content

Sample State

danamansana edited this page Dec 28, 2017 · 2 revisions

Sample State

    {entities: {
        items: {
        • 1: {body: 'body', id: 1, parent_id: 1, parent_type:'question' comment_ids: [1,2,3], votes:4, author: 1}
        • 2: {body: 'body', id: 2, parent_id: 1, parent_type: 'answer', comment_ids: [4,5,6], votes:4, author: 1} }
          users: {
          • 1: {username: 'name', id: 1, question_ids: [1,2], comment_ids: [3], answer_ids: [1,2]}}
        }
      session:{
        current_user: {
        • username: 'name'
        • id:1
        • liked_comments:[1,2,3]
        • liked_questions:[1,2,3]
        • liked_answers:[1,2,3]
        • questions:[3,4,5]
        • answers:[2,3,5]
        • comments:[3,7]
        }
      ui: {
        errors: {
        • login: {}
        • sign up: {}
        }
      }

Clone this wiki locally