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

No underscores in query params. #271

Open nbwoodward opened 6 years ago

nbwoodward commented 6 years ago

Maybe this isn't a big deal, but it was driving me crazy for a while. If I put an underscore in a route parameter, it doesn't match.

routes = { '/location/location_id':{}, '/location/locationid':{} }

For the url /location/10

`

This matches.
This doesn't match.

`

Cheers, Nick EDIT: Also, thanks for making this router, I think it's a great addition to the react/redux stack.

cesarp commented 6 years ago

I believe it is documented but not in a clear way in the Wiring up the boilerplate section. In the code snippet it says that for URL matching it is using https://github.com/snd/url-pattern and if you go to its documentation you will see which characters are supported.