Vue js 3 - watch window.innerWidth does not working

Hi Everyone,

I just want to know how to fix my issue in my project… i am trying to watch the innerwidth of my window but its not working. i tried to console log the new value but its not displaying to my console… please help thank you!

 setup() {
    // Stepper Settings
    let stepper = reactive({
      step: 1,
      isStepperVertical: false,
      windowInnerWidth: window.innerWidth,
    });
    watch(
      () => stepper.windowInnerWidth,
      (newValue, oldValue) => {
        console.log(stepper);
        stepper.isStepperVertical = newValue < 850;
      }
    );
    return {
      stepper,
    };
  }

You can only watch reactive properties within your app. You cannot watch browser API properties.

To react to changes on the browser window width, use the resize event.