Skip to main content

All Questions

1 vote
1 answer
692 views

React + Websocket + Redux

I have a server (express), which refreshes data every 50ms. I added a websocket server on this express server, and for a list of data I just send them through this websocket to the react interface. So ...
Yogaa D's user avatar
  • 13
0 votes
1 answer
747 views

Memoizing PusherJS subscriptions in a react app

Initially, I wrote a hook, which would connect to a pusher channel then update the internal payload to whatever message is received from pusher. export const ChannelHook = <T>( channelName: ...
Blaine's user avatar
  • 637
1 vote
1 answer
1k views

Prevent duplicate websocket message Laravel Echo and React

I have an app that works using Laravel on the backend, and React on the frontend. We are using beyondcode/laravel-websockets to broadcast websocket messages from the Laravel server to a React client. ...
justadev's user avatar
  • 1,406
4 votes
2 answers
3k views

Receiving same message multiple times via web socket. The older messages are replaced after 3 or 4 new chat messages

I am integrating web sockets into React with Django in back-end. I am able to send messages, and receive the new messages from the back-end. The problem is that after sending 3 or 4 messages, the ...
Danny's user avatar
  • 327
3 votes
2 answers
1k views

Websocket event receiving old redux state in React app

I am building a Chat application using Reactjs and Redux. I have 2 components called ChatHeads and ChatBox which get mounted side-by-side at the same time. In the ChatHeads component, the selection of ...
Sreekar Mouli's user avatar
0 votes
0 answers
38 views

How can i move my marker continuosly in the google maps while using useEffect and redux

So, in my project I need to use google maps inorder to track the live position. I was getting the live coordinates with the socket connection from the backend and I stored them in the redux store ...
Random guy's user avatar
0 votes
2 answers
144 views

React/Redux mapStateToProps by ownProps

I'm trying to add a component in react which will get updates from websockets (already working) according its property: <div><Temperature room='livingroom'/></div> <div><...
melay's user avatar
  • 3
1 vote
1 answer
409 views

Creating Redux actions for API calls that don't modify the state directly

We are developing a React application using Redux to manage the state. In general, Redux serves us well, but in one part of the application, we are using WebSockets to update our app state to allow ...
Edgar Chirivella's user avatar
1 vote
1 answer
635 views

Redux in WebSocket Server

I am building a multiplayer game using React, Redux and WebSockets. What I'd like to know is if it is "allowed" to use Redux on the server-side. I would like to use it as follows: Dispatch an action ...
Andries's user avatar
  • 101
0 votes
2 answers
4k views

How to disconnect a websocket?

I am using socket.io-client for connecting websocket import socketIOClient from "socket.io-client"; After successfull api call i am opening a web socket and i can able to connect to socket and fetch ...
sivasai081's user avatar
0 votes
1 answer
201 views

Initialize Redux state with data from websocket

I'm building a React-Redux application where a property in the state object is populated by data from a websocket connection. What's the most efficient way to do this and keep my app in sync with ...
Dave Kalu's user avatar
  • 1,579
2 votes
3 answers
4k views

Should I fetch all data at once and save it in the state?

I am currently implementing pagination for a list of users(just an example). One approach is to fetch users by page. This means that I pass something to the API so that it would return a set of users ...
anlogg's user avatar
  • 1,090
0 votes
1 answer
230 views

Redux add websocket as prop

I have react application with that needed single websocket connection, so i connect websocket from redux action and trying to set websocket instance as prop; so I can access this instance any ware in ...
Wimal Weerawansa's user avatar
1 vote
2 answers
231 views

Chat app: What to do on successful re-connection to the WebSocket server?

My friend and I are currently building a web-based chat app with WebSocket. I'm in charge of client side (React + Redux). Golang is used for the server side (I don't know whether this is a good ...
hitochan's user avatar
  • 1,058
1 vote
2 answers
1k views

Websocket as promised for redux

How can I transform this websocket as promised in redux ? I wanted to use this library https://www.npmjs.com/package/websocket-as-promised , but I don't know how to implement this in my weksocket. I ...
De Giovanni's user avatar

15 30 50 per page