Skip to content

Instantly share code, notes, and snippets.

@0bx
0bx / WebSocketClient.ts
Last active April 29, 2021 09:04
Redux aware WebSocket client
/**
* Redux aware WebSocket client compatible with spring-boot-starter-websocket configuration
* It uses Stomp client over SockJS socket implementation. It allows for providing map of topic
* names to their respective handlers/callbacks. Handlers are called with custom props object
* that mixes Stomp properties with Redux state/dispatch.
*
* @author: https://github.com/0bx
**/
// Example usage:

Keybase proof

I hereby claim:

  • I am 0bx on github.
  • I am 0rh (https://keybase.io/0rh) on keybase.
  • I have a public key ASAbo5SkBYVBTrDPJD5N8UxluW4HdEiDYn9DlS6w8x--tgo

To claim this, I am signing this object: