Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Navigation cleanup #102

Closed
wants to merge 4 commits into from
Closed

Navigation cleanup #102

wants to merge 4 commits into from

Conversation

ifsimicoded
Copy link
Contributor

Closes #101
implemented NavLinks component to simplify active class logic.

Copy link
Contributor

@benweatherman benweatherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐐

Copy link
Contributor

@mateoclarke mateoclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ❤️ this code and I think it does the right thing, simplifying our logic around active state.

But, I'm worried about how this would work in a static world. Until we have more clarity about how we port our site into Next, Gatsby, etc, we might not want to lean into NavLink or other components provided by react-router-dom.

For example, Next uses its own routing library which doesn't seem to have NavLink in their API: https://github.com/zeit/next.js#routing

Gatsby's Link component actually has a wrapper component that acts as a plugin for react-router-dom.
https://www.npmjs.com/package/gatsby-link

mateoclarke pushed a commit that referenced this pull request Jan 23, 2018
Active state styling wasn't being applied in the Navmenu because of language code prefixed in the paths.

Doing this made me think that the NavLink component provided by react-router-dom is a better solution than this. ex: #102 🙃

We should use existing router functionality once we choose a router for server-side/static generation.
@ifsimicoded
Copy link
Contributor Author

Waiting to determine which routing library we stick with for static rendering.

@ifsimicoded ifsimicoded deleted the sd-cleanup-navlinks branch March 1, 2018 21:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants