Skip to content

Sample State

Matthew-SA edited this page Jan 7, 2020 · 5 revisions
{
  entities: {
    users: {
      2: {
        id: 2,
        username: 'Rabican',
        authoredMessages: [1,2],
        avatarURL: 'www.genericimages.fake/apple',
      },
      7: {
        id: 7,
        username: 'Maeldun',
        authoredMessages: [3, 4],
        avatarURL: 'www.genericimages.fake/pear',
      }
    },
    channels: {
      1: {
        id: 1,
        channelName: 'Cloudspine',
        description: 'lovely in winter',
        memberIds: [2,7],
      },
      2: {
        id: 2,
        channelName: 'Tain',
        description: 'where is everyone?',
        memberIds: [7,2],
      }
    },
    conversations: {
      1: {
        id: 1,
        memberIds: [2,7],
        messageIds: [1,2],
      }
      2: {
        id: 2,
        memberIds: [2,7],
        messageIds: [1,2],
      }
    },
    messages: {
      1: {
        author: 1,
        body: "I've got a wife, and kids, millions of kids!"
      }
    }
  },
  ui: {
    loading: true/false
  },
  errors: {
    login: ["Incorrect username/password"]
  },
  session: { currentUserId: 7 }
}

Clone this wiki locally