Design comparison
SolutionDesign
Solution retrospective
This is my second page on React, I look forward to your suggestions and comments :)
Community feedback
- @IryDevPosted about 1 year ago
Hi @gabrielveliz, you did a great job on this challenge 😁
I think you can use the map method with react in order to don't repeat yourself in the navigation components or when you use nav-link :
JSX :
{links.map((link, index) => ( <li key={index}> <NavLink onClick={updateMenu} to={link.to}> <span>0{index}</span> {link.name} </NavLink> </li> ))}
I hope you'll find this helpful, and your solution is really good 😄
Marked as helpful1
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