{"action":"created","issue":{"url":"https://api.github.com/repos/t4t5/react-native-router/issues/51","labels_url":"https://api.github.com/repos/t4t5/react-native-router/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/t4t5/react-native-router/issues/51/comments","events_url":"https://api.github.com/repos/t4t5/react-native-router/issues/51/events","html_url":"https://github.com/t4t5/react-native-router/issues/51","id":97240549,"number":51,"title":"Defining the name of a page","user":{"login":"RWOverdijk","id":781745,"avatar_url":"https://avatars.githubusercontent.com/u/781745?v=3","gravatar_id":"","url":"https://api.github.com/users/RWOverdijk","html_url":"https://github.com/RWOverdijk","followers_url":"https://api.github.com/users/RWOverdijk/followers","following_url":"https://api.github.com/users/RWOverdijk/following{/other_user}","gists_url":"https://api.github.com/users/RWOverdijk/gists{/gist_id}","starred_url":"https://api.github.com/users/RWOverdijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RWOverdijk/subscriptions","organizations_url":"https://api.github.com/users/RWOverdijk/orgs","repos_url":"https://api.github.com/users/RWOverdijk/repos","events_url":"https://api.github.com/users/RWOverdijk/events{/privacy}","received_events_url":"https://api.github.com/users/RWOverdijk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-25T17:21:12Z","updated_at":"2015-08-14T15:15:52Z","closed_at":null,"body":"I've been playing around with this module a bit and so far it works really well. There's one thing that's bothering me though.. That's the name property. It looks like it's up to the initiator of the view to decide what the name of the view should be. For instance, on line 45 of HomePage.js in the twitter example:\r\n\r\n```javascript\r\n{\r\n  goToTweet: function(tweetData) {\r\n    this.props.toRoute({\r\n      name: \"Tweet\",\r\n      component: TweetPage,\r\n      data: tweetData\r\n    });\r\n  }\r\n}\r\n```\r\n\r\nThe name is being defined there. What if the app has several places that initiate this? Would I have to add this all over the place? Can it be defined from within the page view itself, too?"},"comment":{"url":"https://api.github.com/repos/t4t5/react-native-router/issues/comments/131143641","html_url":"https://github.com/t4t5/react-native-router/issues/51#issuecomment-131143641","issue_url":"https://api.github.com/repos/t4t5/react-native-router/issues/51","id":131143641,"user":{"login":"allenhartwig","id":1261521,"avatar_url":"https://avatars.githubusercontent.com/u/1261521?v=3","gravatar_id":"","url":"https://api.github.com/users/allenhartwig","html_url":"https://github.com/allenhartwig","followers_url":"https://api.github.com/users/allenhartwig/followers","following_url":"https://api.github.com/users/allenhartwig/following{/other_user}","gists_url":"https://api.github.com/users/allenhartwig/gists{/gist_id}","starred_url":"https://api.github.com/users/allenhartwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenhartwig/subscriptions","organizations_url":"https://api.github.com/users/allenhartwig/orgs","repos_url":"https://api.github.com/users/allenhartwig/repos","events_url":"https://api.github.com/users/allenhartwig/events{/privacy}","received_events_url":"https://api.github.com/users/allenhartwig/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T15:15:52Z","updated_at":"2015-08-14T15:15:52Z","body":"You could accomplish this like so:\r\n```js\r\n{\r\n  goToTweet: function(tweetData) {\r\n    var TweetPage = require('./pages/tweet')';\r\n    this.props.toRoute({\r\n      name: TweetPage.title,\r\n      component: TweetPage.component,\r\n      data: tweetData\r\n    });\r\n  }\r\n}\r\n```\r\nwith pages/tweet.js exporting:\r\n```js\r\nmodule.exports = {\r\n   title: 'Tweet',\r\n   component: myTweetComponent\r\n};\r\n```"}}