import { makeVar, useReactiveVar } from '@inject/shared/utils/reactive'

const initialSettings: string | null = null

export const ws = makeVar<string | null>(initialSettings)
export const useWs = () => useReactiveVar(ws)

ws.onNextChange(function onNext() {
  ws.onNextChange(onNext)
})
