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?
-
This is a question way beyond a StackOverflow question. You need to have a server and some sockets. Not something easily answered here. – Adrian Brand Jul 17 '20 at 04:53
2 Answers
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.

- 13,043
- 3
- 52
- 88
You need to add socket programming to your react application along with server

- 3,139
- 1
- 25
- 24