Skip to content

Sample State Shape

greathmaster edited this page Mar 2, 2020 · 2 revisions
{
  entities: {
    users: {
      11: {
        id: 11,
        username: "daffy",
      },
      25: {
        id: 25,
        username: "donald",
      },
    },
    messages: {
      65: {
        id: 65,
        content: "Quacks don't echo!",
        channelId: 4,
        ownerId: 1,
      },
    },
    userChannels: {
      1: {
        id: 1,
        userId: 81,
        channelId: 90,
      },
      3: {
        id: 3,
        userId: 49,
        channelId: 90,
      },
    },
    channels: {
      2: {
        id: 2,
        name: "Quacking Time",
        ownerId: 25,
        private: false,
      },
      6: {
        id: 6,
        name: "Stop quacking so loud!",
        ownerId: 28,
        private: true,
      },
    },
    workspaces: {
      1: {
        id: 1,
        name: "United Ducks",
        ownerId: 1,
      },
    },
    workspacesChannels: {
      1: {
        id: 1,
        workspaceId: 1,
        channelId: 3,
      },
    },
    ui: {
      loading: true / false,
    },
    errors: {
      login: ["Incorrect username/password combination"],
    },
    session: { currentUserId: 25 },
  },
}

Clone this wiki locally