Created
April 4, 2018 15:06
-
-
Save bryzettler/07413bbde941e8024f04afc72b2e3271 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createNamespacedAction } from '../../utils/actionsUtils'; | |
const stompAction = createNamespacedAction('@stomp'); | |
export const connect = stompAction('CONNECT'); | |
export const messageRecevied = stompAction('MESSAGE_RECEVIED'); | |
export const disconnect = stompAction('DISCONNECT'); | |
export const subscribe = stompAction('SUBSCRIBE', ({ subscriptionName, destination, onmessage }) => ({ | |
subscriptionName, | |
destination, | |
onmessage, | |
})); | |
export const unsubscribe = stompAction('UNSUBSCRIBE', subscriptionName => ({ subscriptionName })); | |
export const unsubscribeAll = stompAction('UNSUBSCRIBE_ALL'); | |
export const connecting = stompAction('CONNECTING'); | |
export const connected = stompAction('CONNECTED'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment