{"action":"created","issue":{"url":"https://api.github.com/repos/tommikaikkonen/redux-orm/issues/65","repository_url":"https://api.github.com/repos/tommikaikkonen/redux-orm","labels_url":"https://api.github.com/repos/tommikaikkonen/redux-orm/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/tommikaikkonen/redux-orm/issues/65/comments","events_url":"https://api.github.com/repos/tommikaikkonen/redux-orm/issues/65/events","html_url":"https://github.com/tommikaikkonen/redux-orm/issues/65","id":191755481,"number":65,"title":"Can I pass an id to createSelector?","user":{"login":"Jafula","id":434720,"avatar_url":"https://avatars.githubusercontent.com/u/434720?v=3","gravatar_id":"","url":"https://api.github.com/users/Jafula","html_url":"https://github.com/Jafula","followers_url":"https://api.github.com/users/Jafula/followers","following_url":"https://api.github.com/users/Jafula/following{/other_user}","gists_url":"https://api.github.com/users/Jafula/gists{/gist_id}","starred_url":"https://api.github.com/users/Jafula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jafula/subscriptions","organizations_url":"https://api.github.com/users/Jafula/orgs","repos_url":"https://api.github.com/users/Jafula/repos","events_url":"https://api.github.com/users/Jafula/events{/privacy}","received_events_url":"https://api.github.com/users/Jafula/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-25T19:14:00Z","updated_at":"2016-11-25T20:38:41Z","closed_at":null,"body":"My use case: I'm using redux-saga to process an action to get information from server. All I have in my action payload is the id of the object and I need to get other information from the object before I can call my server api. (I'm new to react/redux and still learning and haven't got quite got my head around all this.)\r\n\r\nIs there a way to pass an id to createSelector to get an object from a list? In the primer, there is a selector to get all todos, but not one to get a single todo. The get single user selector in the primer uses information from the state. The id I want to use is not in state but needs to be passed in as a parameter.\r\n\r\nCould someone show me how to write a selector to get a single todo from the todos list using (redux-orm) createSelector without getting the id of the todo from state? \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tommikaikkonen/redux-orm/issues/comments/263020161","html_url":"https://github.com/tommikaikkonen/redux-orm/issues/65#issuecomment-263020161","issue_url":"https://api.github.com/repos/tommikaikkonen/redux-orm/issues/65","id":263020161,"user":{"login":"markerikson","id":1128784,"avatar_url":"https://avatars.githubusercontent.com/u/1128784?v=3","gravatar_id":"","url":"https://api.github.com/users/markerikson","html_url":"https://github.com/markerikson","followers_url":"https://api.github.com/users/markerikson/followers","following_url":"https://api.github.com/users/markerikson/following{/other_user}","gists_url":"https://api.github.com/users/markerikson/gists{/gist_id}","starred_url":"https://api.github.com/users/markerikson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markerikson/subscriptions","organizations_url":"https://api.github.com/users/markerikson/orgs","repos_url":"https://api.github.com/users/markerikson/repos","events_url":"https://api.github.com/users/markerikson/events{/privacy}","received_events_url":"https://api.github.com/users/markerikson/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T20:38:41Z","updated_at":"2016-11-25T20:38:41Z","body":"Ah, gotcha.  \r\n\r\nI actually haven't used Redux-ORM's `createSelector` function yet myself.  Looking at the examples in the \"Redux-ORM Primer\" page, I'm pretty sure that they show exactly what you're looking for.  See this section: https://github.com/tommikaikkonen/redux-orm-primer#writing-selectors .  I suppose that instead of passing in a selector that retrieves a `selectedId` from the state, you could do something like `_.constant(42)`, which would create a function that always returns `42`, or something along that line.\r\n\r\nGotta say I'm glad to hear that A) someone is actually reading my \"Practical Redux\" series, and that B) it actually sounds useful! :)  I would actually be very interested in any feedback you have on the series - content, post formatting, topics, etc.  If you get a chance, I'd appreciate any thoughts or comments you have as comments on the posts themselves, or issues on the Project Mini-Mek repo!\r\n\r\n"}}
{"actor":{"display_login":"markerikson"}}