Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

ReactJS with React Router solution for Space Tourism Website

Lemuel Leogene Reyes•290
@lemreyes
A solution to the Space tourism multi-page website challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

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.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License