I’m trying to hide multiple elements inside the DOM by changing shared state when window is resized. And when i try to It should change the state ** hideOnMobile** to true but it doesn’t somehow any idea? Answer Have you tried using @resize.window? (ie. adding the resize listener using Alpine.js) it should make your code simpler than using window.onresize +