Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

standardize path / pathDef in route code #272

Closed
alanning opened this issue Aug 13, 2015 · 1 comment
Closed

standardize path / pathDef in route code #272

alanning opened this issue Aug 13, 2015 · 1 comment

Comments

@alanning
Copy link
Contributor

It's sometimes useful to access the pathDef for a route, such as when logging which route is getting executed. In the code, there are two different ways that the path definition is referenced:

  1. path - https://github.com/kadirahq/flow-router/blob/master/client/route.js#L5
  2. pathDef - https://github.com/kadirahq/flow-router/blob/master/client/router.js#L189

Would you be open to a PR which standardized on pathDef?

It would help make things like this more clear:

FlowRouter.current().path         // => /apps/this-is-my-app?show=yes&color=red
FlowRouter.current().route.path   // => /apps/:appId
@arunoda
Copy link
Contributor

arunoda commented Aug 13, 2015

The places you mentioned in the same place right? 2nd one using the 1st one.
Anyway, I get it.

In the route, you want to mention it as pathDef. Yep, which is sounds good to me.
But, I don't wanna break any apps. So, we need to keep the path as it is.
We can remove path in 3.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants