Skip to content

signar off method with callback did not work #6

@zmarsel1

Description

@zmarsel1

example of code

`
import { useSignalR } from '@dreamonkey/vue-signalr'
import { SignalRNotificationType } from '@/enums/SignalRNotificationType'
import { Toast } from '@/services/SwalHelper'

const store = useLaborantIncomingStore()
const signalr = useSignalR()

const defaultNotificationHandler = (type: SignalRNotificationType, message: string) => {
if (type == SignalRNotificationType.NewBidResults) {
Toast.fire({ icon: 'info', text: JSON.parse(message)?.Message })
}
}

signalr.on('SendNotification', defaultNotificationHandler)
signalr.off('SendNotification', defaultNotificationHandler)
`
expected behavior: ignore callback
current behavior: callback is still working

for vue component i'm using composition api

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions