Sha256: b9a6be414c128dcc9b43ac7cdc433cbfdcef3324b947bfcda0457e03db2e24f7
Contents?: true
Size: 420 Bytes
Versions: 10
Compression:
Stored size: 420 Bytes
Contents
let consumer export async function getConsumer() { if (consumer) return consumer const { createConsumer } = await import("@rails/actioncable/src") return setConsumer(createConsumer()) } export function setConsumer(newConsumer) { return consumer = newConsumer } export async function subscribeTo(channel, mixin) { const { subscriptions } = await getConsumer() return subscriptions.create(channel, mixin) }
Version data entries
10 entries across 10 versions & 1 rubygems