Design comparison
Solution retrospective
Hi guys, This is the solution to the challenge, I had some problems in mobile development, the menu has 2 scrolls, I still don't know how to solve it.🙁
Any feedback to improve my coding skills will be of great help to me. Thank you! 😀
Community feedback
- @DavidMorgadePosted over 2 years ago
Hey Harvey, congrats on finishing the challenge!
The problem you have with the scroll, is that you are still rendering the rest of the page even when your lateral menu popups, with React you can conditionally render the rest of your page using the useState hook, adding a conditional state that changes onClick at the menu open button, if its true it hides the rest of your page.
I'm gonna check your repository since I can do that much with the developer tools, will edit this comment when I get the fixes do and explain what I did!
@YerikAH I sent you a pull request with the fixes!
- Moved state handling and your handleMenu function to the parent component (App) for better control.
- Added conditional rendering to your main and footer depending on the state of the menu.
Now that annoying scrollbar is gone!
Marked as helpful1@YerikAHPosted over 2 years ago@DavidMorgade Thank you very much for your help, I think I learned something incredible. I will use it in next projects.
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord