Submitted over 2 years ago
Intro section with dropdown navigation solution - React
@Lfrancos
Design comparison
SolutionDesign
Solution retrospective
Hello everyone, hope that everyone is enjoying the challenges :)
With this challenge I spent a lot of time trying to understand what is the best way to organize the JSX to render the header. If you can see I wanted to use conditional rendering and if you go to "./src/components/header/header.js" you will see that I ended up duplicating this JSX and I'm not sure if that is a good practice. `
<ul className='options'> <DropDownMenu subMenus={features}>Features</DropDownMenu> <DropDownMenu subMenus={company}>Company</DropDownMenu> <Button buttonStyle='none' className='none'>Careers</Button> <Button buttonstyle='none' className='none'>About</Button> </ul> `If you know a way to make this better I would really appreciate your help : ) Thank you!
Community feedback
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