This repository has been archived on 2020-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
|
import cable from "actioncable";
|
|
|
|
let consumer;
|
|
|
|
const createChannel = (...args) => {
|
|
if (!consumer) {
|
|
consumer = cable.createConsumer();
|
|
}
|
|
|
|
return consumer.subscriptions.create(...args);
|
|
};
|
|
|
|
export default createChannel;
|