When building a React/Redux application that contains an amount state that is shared between many users, what is a good approach to synchronize the state so that when user A does action X, user B's state also updates to reflect the action, without having to refresh the app?
I'm thinking something along the lines of a Redux middleware that intercepts all actions and passes them over via Web Sockets to all the subscribed users. On the receiving end, we listen on the connection and dispatch the actions as they come -- I wonder if there's a library that deals specifically with this, and might have some extra subtlety implemented around dealing with 'conflicting' actions, etc.
When building a React/Redux application that contains an amount state that is shared between many users, what is a good approach to synchronize the state so that when user A does action X, user B's state also updates to reflect the action, without having to refresh the app?
I'm thinking something along the lines of a Redux middleware that intercepts all actions and passes them over via Web Sockets to all the subscribed users. On the receiving end, we listen on the connection and dispatch the actions as they come -- I wonder if there's a library that deals specifically with this, and might have some extra subtlety implemented around dealing with 'conflicting' actions, etc.