You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Odonno on one project. I have one problem with the action createSignalRHub(hub).
I put this.store.dispatch(createSignalRHub(hub)); in the container of one component which needs signalr.
The first time when I display the component everything is good but when I come back a second time on this component, I dispatch a second time createSignalRHub(hub) and the effect link to signalrHubUnstarted an error is thrown because is enabled to add existing method.
I tried to dispatch createSignalRHub(hub) in a guard only when the hub doesn't exist, problem the selector selectHubStatuses doesn't work when *createSignalRHub(hub) is not yet dispatched.
So I think I misunderstood something... May you help me to know when or where dispatch createSignalRHub(hub) ? What is the good practise ?
Thanks a lot for your help
The text was updated successfully, but these errors were encountered:
hocino
changed the title
[Best practise] When/Where is the best location to dispatch createSignalRHub(hub) ?
[Help][Best practise] When/Where is the best location to dispatch createSignalRHub(hub) ?
Aug 1, 2023
Hello,
I use Odonno on one project. I have one problem with the action createSignalRHub(hub).
I put this.store.dispatch(createSignalRHub(hub)); in the container of one component which needs signalr.
The first time when I display the component everything is good but when I come back a second time on this component, I dispatch a second time createSignalRHub(hub) and the effect link to signalrHubUnstarted an error is thrown because is enabled to add existing method.
I tried to dispatch createSignalRHub(hub) in a guard only when the hub doesn't exist, problem the selector selectHubStatuses doesn't work when *createSignalRHub(hub) is not yet dispatched.
So I think I misunderstood something... May you help me to know when or where dispatch createSignalRHub(hub) ? What is the good practise ?
Thanks a lot for your help
The text was updated successfully, but these errors were encountered: