FormidableLabs / redux-little-router

A tiny router for Redux that lets the URL do the talking.
MIT License
1.04k stars 113 forks source link

Link's active state is super opinionated #284

Open manuphatak opened 6 years ago

manuphatak commented 6 years ago

In the <Link> component, isActive could be a bit more robust.

https://github.com/FormidableLabs/redux-little-router/blob/0adead109d631858eee89066a5d87777e4d3eac7/src/components/link.js#L103

activeProps is a cool idea, however, having more control over whether or not the link isActive might be a small improvement.

Example use case

I have a navbar with 3 links, let's call them "movies", "blogs", and "reports". Clicking movies takes you to an index page /movies. For /movies I want to say "movies" IS active. If I click to /movies/watchlist, for this case, I want to say "movies" is STILL active.

suggestions

mymattcarroll commented 6 years ago

Would a pull request be welcome for this change? I would be more than happy to contribute.