Merge pull request #148 from robonen/docs
Publish to NPM / Check version changes and publish (push) Failing after 2m26s

refactor(docs): remove unused broadcastedRef composable
This commit is contained in:
2026-06-15 17:50:26 +07:00
committed by GitHub
@@ -1,27 +0,0 @@
import { customRef, onScopeDispose } from 'vue';
export function broadcastedRef<T>(key: string, initialValue: T) {
const channel = new BroadcastChannel(key);
onScopeDispose(channel.close);
return customRef<T>((track, trigger) => {
channel.onmessage = (event) => {
track();
return event.data;
};
channel.postMessage(initialValue);
return {
get() {
return initialValue;
},
set(newValue: T) {
initialValue = newValue;
channel.postMessage(newValue);
trigger();
},
};
});
}