This is for creating a Message. A message requires contacts (ids) and a few fields. The Group checkbox is simply used to select all contacts under it. It does not have anything to do with the Message itself.
Currently, I just have a GroupStore and SelectedContactStore. However, I feel that the current setup is a bit tedious, and very prone to errors. I am not sure if this is due to Immutable.
Not specifically to Alt, though. I am not sure how to structure my stores with this certain situation.
Let's say, we have 3 resources:
Member
,Group
, andConversation
.Member
belongsToManyConversation
; and vice-versa. (x:x)Member
belongsToGroup
(x:1)Group
andConversation
has no direct relationship. This is becauseGroup
is only being used to literally contain aMember
.* Note that the API route (
api/groups/
-- which is expected to return all groups also includes its contacts) . It returns something like this:This is the UI:
This is for creating a Message. A message requires contacts (ids) and a few fields. The Group checkbox is simply used to select all contacts under it. It does not have anything to do with the Message itself.
Currently, I just have a
GroupStore
andSelectedContactStore
. However, I feel that the current setup is a bit tedious, and very prone to errors. I am not sure if this is due to Immutable.Here's an idea of the code:
Any better way to do this?