I'm developing a video chat app with react and using redux for state management. Currently using agora for webRTC. As webRTC related events happen (streams get added, removed, and a whole lot more), the state should be updated and sent to all the components that need/depend on it.
However, redux alone is not meant for this. As discussed in this SO question, and by Dan Abramov (the maker himself), redux is not meant for classes, therefore storing webRTC streams there is a bad idea.
I suppose that I should have my own webRTC state stored and managed manually (somewhere, idk where
Still, I'm having a hard time understanding how to store the webRTC streams myself:
bottom line:
Can someone please give a good and detailed explanation or point me to a repo with code that does this well?
I found a good base example code in the redux-saga documentation that manages events from a websocket - which is not too different than events from a webRTC client.