{"comment":{"url":"https://api.github.com/repos/nateabele/ui-router/comments/11544687","html_url":"https://github.com/nateabele/ui-router/commit/fe21815e7e65e6e1ccb051af060aae53d45c1ad7#commitcomment-11544687","id":11544687,"user":{"login":"nateabele","id":18288,"avatar_url":"https://avatars.githubusercontent.com/u/18288?v=3","gravatar_id":"","url":"https://api.github.com/users/nateabele","html_url":"https://github.com/nateabele","followers_url":"https://api.github.com/users/nateabele/followers","following_url":"https://api.github.com/users/nateabele/following{/other_user}","gists_url":"https://api.github.com/users/nateabele/gists{/gist_id}","starred_url":"https://api.github.com/users/nateabele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nateabele/subscriptions","organizations_url":"https://api.github.com/users/nateabele/orgs","repos_url":"https://api.github.com/users/nateabele/repos","events_url":"https://api.github.com/users/nateabele/events{/privacy}","received_events_url":"https://api.github.com/users/nateabele/received_events","type":"User","site_admin":false},"position":51,"line":365,"path":"src/transition.js","commit_id":"fe21815e7e65e6e1ccb051af060aae53d45c1ad7","created_at":"2015-06-05T16:22:22Z","updated_at":"2015-06-05T16:22:22Z","body":"> `StateReference.identifier()` is necessary to know what was used to initiate the transition, but it is clunky to use because you still have to check for string or object and behave appropriately.\r\n\r\nI think you're thinking of two different things. As a user, if I use string state names in my app, I'm going to use them consistently, both in `transitionTo()` calls, hooks, and elsewhere. Likewise with objects. Internally (or as a plugin developer), I can use the internal APIs to check (internal) state object identity or whatever else.\r\n\r\nIf we want to give people easier _public_ access to _their_ state definition (vs. the internal one), I can roll back to something closer to what I had in my working copy initially, i.e.:\r\n\r\n```javascript\r\nto: extend(function() { return to.identifier(); }, {\r\n  state: function() { return to.state(); },\r\n}),\r\n```\r\n\r\nThat way you get `transition.to()` for whatever you passed to `transitionTo()` for doing basic checks, and `transition.to.state()` to get access to the whole (user-land) state object."}}