kristoferbaxter / react-hn

Demonstration of React used to build Hacker News as a PWA.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Navigation for / and /top/:page should highlight the "top" tab in header

kristoferbaxter opened this issue · comments

I don't see a way to pass a custom method to <NavLink> from React-Router for denoting it's active classes.

Idea 1:
Use a custom <Match> component to derive when either url pattern is matched and apply via standard classNames

Idea 2:
Modify React-Router to accept custom methods for determining active states.

Idea 3:
Move away from React-Router entirely and implement a custom router. (Likely don't have time for this).