{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/1514","labels_url":"https://api.github.com/repos/rackt/react-router/issues/1514/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/1514/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/1514/events","html_url":"https://github.com/rackt/react-router/issues/1514","id":94305031,"number":1514,"title":"Route Reversal in v1.0","user":{"login":"aldendaniels","id":4658558,"avatar_url":"https://avatars.githubusercontent.com/u/4658558?v=3","gravatar_id":"","url":"https://api.github.com/users/aldendaniels","html_url":"https://github.com/aldendaniels","followers_url":"https://api.github.com/users/aldendaniels/followers","following_url":"https://api.github.com/users/aldendaniels/following{/other_user}","gists_url":"https://api.github.com/users/aldendaniels/gists{/gist_id}","starred_url":"https://api.github.com/users/aldendaniels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldendaniels/subscriptions","organizations_url":"https://api.github.com/users/aldendaniels/orgs","repos_url":"https://api.github.com/users/aldendaniels/repos","events_url":"https://api.github.com/users/aldendaniels/events{/privacy}","received_events_url":"https://api.github.com/users/aldendaniels/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":37,"created_at":"2015-07-10T13:15:01Z","updated_at":"2015-08-18T08:45:09Z","closed_at":null,"body":"In ReactRouter `0.13`, the following was supported:\r\n```javascript\r\nrouter.makeHref('emails', {label: labelId});\r\n```\r\n```javascript\r\n<Link to=\"emails\" {label: labelId}>\r\n```\r\n\r\nReact router would do a reverse lookup on the route structure and generate a URL that looks like this:\r\n```\r\n/labels/12345/emails\r\n```\r\n\r\nIt looks like this functionality (which is common to most routers) was dropped in `v1.0`. Now the following is required, which is much more brittle:\r\n\r\n```javascript\r\n<Link to={\"labels/\" + urlEscape(labelId) + \"/emails\"}>\r\n```\r\n\r\nAre there plans to restore this capability before releasing `1.0`?"},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/132121871","html_url":"https://github.com/rackt/react-router/issues/1514#issuecomment-132121871","issue_url":"https://api.github.com/repos/rackt/react-router/issues/1514","id":132121871,"user":{"login":"tomatau","id":1243486,"avatar_url":"https://avatars.githubusercontent.com/u/1243486?v=3","gravatar_id":"","url":"https://api.github.com/users/tomatau","html_url":"https://github.com/tomatau","followers_url":"https://api.github.com/users/tomatau/followers","following_url":"https://api.github.com/users/tomatau/following{/other_user}","gists_url":"https://api.github.com/users/tomatau/gists{/gist_id}","starred_url":"https://api.github.com/users/tomatau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomatau/subscriptions","organizations_url":"https://api.github.com/users/tomatau/orgs","repos_url":"https://api.github.com/users/tomatau/repos","events_url":"https://api.github.com/users/tomatau/events{/privacy}","received_events_url":"https://api.github.com/users/tomatau/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T08:45:09Z","updated_at":"2015-08-18T08:45:09Z","body":"I disagree that route names are an anti pattern:\r\n\r\n1. The path hold too much implementation detail.\r\n\r\n2. It isn't a problem checking your route definitions when you need to use them - and you still need to check the definition to see the path structure.\r\n\r\n3. When adding or modifying optional route params for new features, you may now need to go and update all the links pointing to it even though they don't use the optional params... Names separate this concern. Sure, you can use queryStrings... but I use queryStrings and params for different semantic behaviours and optional params are a valid use case.\r\n\r\n4. Names remove code goop.Especially if you want to add a `/?` on the end of every path. Too much implementation detail.\r\n\r\n5. Names make the OP feature easy to implement.\r\n\r\n6. Names make the reason to use `to` instead of `href` more clear. "}}