user7328224
user7328224

Reputation:

Is that possible to use the states in Redux across different browsers for Reactivity?

Does anyone know if that could be possible to use Redux across different browsers on one machine to implement some kind of reactivity? For instance, I've got a todo lists which is state controlled, could these state be shared with several browsers?

Upvotes: 1

Views: 61

Answers (1)

CharlieBrown
CharlieBrown

Reputation: 4163

If you talk about several browsers, you will need to add a backend to the mix, so the backend is the source of truth.

You could setup a simple WebSocket / socket.io server with Node.js. On your clients, send the state to the server when it changes and broadcast it to the rest of connect clients. Here's a nice article in about this, using Redux in the server, that may give you some hints:

https://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html

Upvotes: 1

Related Questions