Menu drawer is not close after rendering new page data in hydrogen

Topic summary

  • Context: Shopify Hydrogen custom storefront (JavaScript). Mobile navigation behaves differently than desktop.
  • Initial issue: Tapping mobile menu links caused full page reloads instead of rendering new page data; desktop menu worked as expected.
  • Change made: Implemented client-side rendering on mobile to avoid reloads.
  • New problem: After navigation via mobile menu links, the menu drawer does not close automatically.
  • Status: Unresolved; seeking troubleshooting guidance to close the drawer after link click without reloading. No code snippets or attachments provided.
Summarized with AI on December 23. AI used: gpt-5.

Hi

In Shopify hydrogen storefront using JavaScript, I got issue that on mobile menu when we click on the links it reload the page every time not render the data of other page. While on desktop menu is working properly.

So now in mobile I have modify code such that it renders the data of other page without reloading, but now on click of the links it is not closed menu drawer.