ReactJS with React Router solution for Space Tourism Website

Solution retrospective
I created the Space Tourism website in React with React Router library. Please let me know if you have some comments.
[Question]
I noticed that I could not style the <NavLink> component using CSS modules through classnames.
The solution I did was to check how the component resolves into the DOM. It turns into an <a> tag.
Then I accessed the CSS class of the parent and select the <a> tag like this:
.navSecondaryContainer a {
Also I have observed that I could not style the children of the <NavLink> component. In one instance I had a button that was wrapped in the <NavLink> tag and the only way I could style was doing this selector: .navButtonContainer a > button {
Please let me know if there is an easier way. Thanks.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Lemuel Leogene Reyes's solution.
Join 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