Zustand as Websocket Middleware #2779
Unanswered
silviaphungky
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, anyone have a good implementation or example for integrate zustand store as websocket middleware?
I will share the context. I have 1 websocket that can return multiple type of message.
Let say I have A B C component in 1 page and each of the component subscribe to A B C event in websocket.
I expect each component will only receive websocket message based on what they already subscribe, but because we use websocket eventlistener, each component will recieve all off the message come from websocket.
I use zustand as the middleware to separate the incoming message to each of the component. I expect with this implementation, the performance will improve, but it turned out to be more laggy.
Beta Was this translation helpful? Give feedback.
All reactions