{"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":34,"created_at":"2015-07-10T13:15:01Z","updated_at":"2015-08-13T21:35:53Z","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/130851614","html_url":"https://github.com/rackt/react-router/issues/1514#issuecomment-130851614","issue_url":"https://api.github.com/repos/rackt/react-router/issues/1514","id":130851614,"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},"created_at":"2015-08-13T21:35:53Z","updated_at":"2015-08-13T21:35:53Z","body":"@jhicken - To @mjackson's point, you can reduce the pain here with a `makePath()` helper.\r\n\r\nFor example, you could do something like this:\r\n\r\n```javascript\r\nlet route = 'company/:companId/workers/:worker/tails/:tail';\r\ntransitionTo(makePath(route, this.props.params));\r\n```\r\n\r\nPersonally, I'd like to be able to do:\r\n\r\n```javascript\r\ntransitionTo('company/:companId/workers/:worker/tails/:tail', this.props.params);\r\n```\r\n\r\n...and have React Router do the substitution for me, but writing my own helper is no big deal."}}