const initScreenListener = (state) => {
  state.height = window.innerHeight
  state.width = window.innerWidth
  window.addEventListener("resize", (e) => {
    state.height= e.target.innerHeight
    state.width = e.target.innerWidth
  });
  return "ok"
}

const disableScreenListener = (state) => {
  window.removeEventListener("resize", () => {
    state.height = null
    state.width = null
  });
  return "ok"
}

export { initScreenListener, disableScreenListener }