Skip to content

Store Shape

Somorovd edited this page Jul 7, 2023 · 9 revisions
store = {

  session: {
    user: { ...userData }
  },

  servers: {
    allUserServers: {
      [serverId]: { ...serverData }
    },
    singleUserServer: {
      channels: {
        [channelId]: { ...channelData }
      },
      users: {
        [userid]: { ...userData }
      }
    },
    discoverableServers: {
      [serverId]: { ...serverData }
    }
  },

  channels: {
    singleChannel: {
      ...channelData,
      messages: [{ ...messageData }]
    }
  },

  communications: {
    allCommunications: {
      [commId]: { ...commData }
    },
    singleCommunication: {
      communication: { ...commData },
      messages: {
        [messageId]: { ...messageData }
      }
    }
  }

}

Clone this wiki locally