Reputation: 422
A ReactJs project is running in two different browsers (two different path from Routes). If a button click is happening in one browser some UI changes need to be happened in other browser. I've tried with redux but it is not working. Is there any solution?
Upvotes: 0
Views: 860
Reputation: 3329
You need to add socket programming to your react application along with server
Upvotes: 1
Reputation: 13266
This can be accomplished by multiple approaches depending on whether the interaction is in same system or across multiple systems.
If the interaction is within same system, same browser you can consider approaches based on window.postMessage
or localstorage
events as done by https://github.com/runningskull/locmsg
If the interaction is between two different devices or two different browsers you will need a server to coordinate between two instances you may have to rely on libraries such as https://socket.io/ or https://dotnet.microsoft.com/apps/aspnet/signalr or Google Fire Base How to publish message in Google Pub/Sub from Firebase Cloud Function? and their react counter part.
Upvotes: 1