{"action":"closed","issue":{"url":"https://api.github.com/repos/mxstbr/react-boilerplate/issues/772","repository_url":"https://api.github.com/repos/mxstbr/react-boilerplate","labels_url":"https://api.github.com/repos/mxstbr/react-boilerplate/issues/772/labels{/name}","comments_url":"https://api.github.com/repos/mxstbr/react-boilerplate/issues/772/comments","events_url":"https://api.github.com/repos/mxstbr/react-boilerplate/issues/772/events","html_url":"https://github.com/mxstbr/react-boilerplate/issues/772","id":167181917,"number":772,"title":"How to pass parameter to selector?","user":{"login":"jk2K","id":4025839,"avatar_url":"https://avatars.githubusercontent.com/u/4025839?v=3","gravatar_id":"","url":"https://api.github.com/users/jk2K","html_url":"https://github.com/jk2K","followers_url":"https://api.github.com/users/jk2K/followers","following_url":"https://api.github.com/users/jk2K/following{/other_user}","gists_url":"https://api.github.com/users/jk2K/gists{/gist_id}","starred_url":"https://api.github.com/users/jk2K/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jk2K/subscriptions","organizations_url":"https://api.github.com/users/jk2K/orgs","repos_url":"https://api.github.com/users/jk2K/repos","events_url":"https://api.github.com/users/jk2K/events{/privacy}","received_events_url":"https://api.github.com/users/jk2K/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mxstbr/react-boilerplate/labels/question","name":"question","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-23T12:20:25Z","updated_at":"2016-07-26T19:59:19Z","closed_at":"2016-07-26T19:59:19Z","body":"I want to get channel with channelId prop\r\n\r\nMy code\r\n```javascript\r\nconst mapStateToProps = (state, ownProps) => {\r\n  return {\r\n    channelId: ownProps.params.channelId,\r\n    channel: selectChannel()\r\n  }\r\n};\r\n```\r\nselectors\r\n```javascript\r\nconst selectHome = () => (state) => state.get('home');\r\n\r\nconst selectChannels = () => createSelector(\r\n  selectHome(),\r\n  (homeState) => homeState.get('channels')\r\n);\r\n\r\nconst selectChannelId = () => (state, ownProps) => ownProps.params.channelId;\r\n\r\nconst selectChannel = () => createSelector(\r\n  selectChannels(),\r\n  selectChannelId(),\r\n  (channels, channelId) => channels.find((channel) => channel.channel_id == channelId)\r\n);\r\n```\r\nI console the `channel`\r\n```javascript\r\n  componentDidMount() {\r\n    console.log(this.props.channel);\r\n    this.props.fetchMessages(this.props.channel);\r\n  }\r\n```\r\nbut i get below, non value, non derived data\r\n![image](https://cloud.githubusercontent.com/assets/4025839/17077825/badc4092-5111-11e6-9108-40a5e2e0b086.png)\r\nAm I doing wrong?"}}
{"actor":{"display_login":"mxstbr"}}