Design comparison
SolutionDesign
Solution retrospective
What specific areas of your project would you like help with?
Hi there! 👋 This was a fun challenge! 😊
There was just one thing I couldn't do: add the active state to the current page on the navbar. I'm new to React and React-router, so if you have some tips on how to make this, please let me know.
thanks! 🤗
Community feedback
- @markuslewinPosted 8 months ago
Hi!
<NavLink>
s know whether they're active or not!<NavLink to={item.link} className={({ isActive }) => { return `styleLinks.base ${isActive ? styleLinks.active : ""}`; }} ></NavLink>
They also enable client-side navigations - similar to the
<Link>
component - for smoother transitions between pages.Marked as helpful0
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