Design comparison
Community feedback
- Account deleted
Hey Cornelia hope you doing well, I've seen your solution and it's code, Actually I'm not a typescript developer, But I have for you a little trick to make the active link have specific styling just with react-router-dom without using useEffect in App.tsx file. The trick is do not use Link use NavLink and add(activeClassName) to NavLink. e.g:
<NavLink className="nav-link" activeClassName="active-nav" to="/" exact>Home</NavLink>
and style the value of activeClassName(it's active-nav in this example). source0 - @OlehTovkaniukPosted about 4 years ago
I can't judge your code because I'm not into React and moreover Typescript. But I like what I see in terms of responsiveness.
0
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