Skip to content

sample state

yangel20 edited this page Nov 17, 2020 · 3 revisions

{

entities: {
  users: {
    1: {
      id: 1,
      username: "meteorman",
      email: "meteorman@mars.com"
    }
  },
  photos: {
    1: {
      id: 1,
      title: "event horizon",
      description: "theoretical boundary around a black hole beyond which no light or other radiation can escape",
      user_id: "1",
      tag_ids: [1, 2]
  },
  albums: {
    1: {
      id: 1,
      head: "the universe"
      user_id: 1
      photo_ids: [1]
  },
  comments: {
    1: {
      id: 1,
      body: "i can't believe i got photo of this"
      user_id: 1,
      photo_id: 1
    }
  },
  tags: {
    1: {
      id: 1,
      name: "event horizon"
    },
    2: {
      id: 2,
      name: "black hole"
    }
  }, 
ui: {
  loading: true/false,
  modal: "login"
},
errors: {
  login: ["Incorrect username or password, please try again."]
},
session: { currentUserId: 1 }

}

Clone this wiki locally