-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create multiple instance of state ? #370
Comments
thank your for your response :/ |
@akbaramd I enjoy sarcasm :) ChatGPT
|
Indeed, an evolution of the store that would allow obtaining a State by an identifier rather than by a Type would be ideal. |
@aboudoux Please explain? There is only one State per type. If you want to create a collection of things in that state you can. But there isn't a collection of the States by type. And I do not believe there should be. If you can give me a use case and show me some sample I will be happy to look in to it. Currently the Type is the identifier. |
If I have a multi-document application in the form of tabs, and each sub-tab also has sub-tabs, I have no choice but to manage a collection of States within a State and pass each State through my actions. This works well, except that today I am stuck because I am creating a chat space, and I would like all the corresponding States of all connected users to refresh with each message post. This can be done quite easily by publishing our action to a multicast Bus, but the problem is that I need to find the concerned State for each user. However, if I have a collection of states within a collection of states, I need a way to find the target State, and I can only do this if each State has a defined identifier (like the chat identifier, for example). |
Here, the green tabs are all the same state type, and within each tab, there are sub-states. In the Conversation(s) section, I can have 2 Chats. I want that when I post a message, another user connected to this can see it. While I can easily send the action between users, it's impossible for me to find the instance of the other user's state based solely on the type. |
i use mdi component and in one page new multiple instance of state in each tab ?
how i can handle this?
The text was updated successfully, but these errors were encountered: