DEV Community

Gündoğdu Yakıcı
Gündoğdu Yakıcı

Posted on

Mobile menu logic

Hello,

I'm using Next.js 13, so I'm new to react. I designed a simple header with Tailwind. When I log in from mobile, I hide the menu and show a hamburger.

When I clicked on this, I prepared a component called MyModal to use it in different operations in many places (for login, register, search, etc.) Because it will be a 90% mobile-based website.

When I use MyModal in the header component and click on the hambuger, I write a mobile-friendly ul menu in it.

Is this kind of approach bad or used for mobile menu? What is your opinion?

Top comments (0)