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 ?
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