{"action":"created","issue":{"url":"https://api.github.com/repos/salsita/redux-elm/issues/42","repository_url":"https://api.github.com/repos/salsita/redux-elm","labels_url":"https://api.github.com/repos/salsita/redux-elm/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/salsita/redux-elm/issues/42/comments","events_url":"https://api.github.com/repos/salsita/redux-elm/issues/42/events","html_url":"https://github.com/salsita/redux-elm/issues/42","id":169326777,"number":42,"title":"Getting component path string","user":{"login":"jmarceli","id":4281333,"avatar_url":"https://avatars.githubusercontent.com/u/4281333?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarceli","html_url":"https://github.com/jmarceli","followers_url":"https://api.github.com/users/jmarceli/followers","following_url":"https://api.github.com/users/jmarceli/following{/other_user}","gists_url":"https://api.github.com/users/jmarceli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarceli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarceli/subscriptions","organizations_url":"https://api.github.com/users/jmarceli/orgs","repos_url":"https://api.github.com/users/jmarceli/repos","events_url":"https://api.github.com/users/jmarceli/events{/privacy}","received_events_url":"https://api.github.com/users/jmarceli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-04T09:09:25Z","updated_at":"2016-08-04T12:45:01Z","closed_at":null,"body":"Hi,\r\nIs it somehow possible to get component path described by action `type` inside that component view? It will be very helpful for naming forms in `redux-form` (ensuring unique name).\r\n\r\nExample:\r\nApplication state structure: `root -> orders -> order`\r\nActions dispatched from `order` has type of: `Orders.Order.*'\r\n\r\nIs it possible to generate `Orders.Order` string inside Order component view?\r\nI didn't find any way of \"extracting\" that component path from dispatch method."},"comment":{"url":"https://api.github.com/repos/salsita/redux-elm/issues/comments/237541754","html_url":"https://github.com/salsita/redux-elm/issues/42#issuecomment-237541754","issue_url":"https://api.github.com/repos/salsita/redux-elm/issues/42","id":237541754,"user":{"login":"jmarceli","id":4281333,"avatar_url":"https://avatars.githubusercontent.com/u/4281333?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarceli","html_url":"https://github.com/jmarceli","followers_url":"https://api.github.com/users/jmarceli/followers","following_url":"https://api.github.com/users/jmarceli/following{/other_user}","gists_url":"https://api.github.com/users/jmarceli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarceli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarceli/subscriptions","organizations_url":"https://api.github.com/users/jmarceli/orgs","repos_url":"https://api.github.com/users/jmarceli/repos","events_url":"https://api.github.com/users/jmarceli/events{/privacy}","received_events_url":"https://api.github.com/users/jmarceli/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T12:45:01Z","updated_at":"2016-08-04T12:45:01Z","body":"As for now I'm wrapping `reduxForm()` inside stateless function which gives me possibility to provide initial values based on redux-elm component model. Still I have no idea how to provide unique value for `form` key. Here is how it looks like:\r\n```\r\nconst OrderFormWrapper = props => {\r\n  const { data, dispatch, model } = props;\r\n  // here both `dispatch` and `model` redux-elm props are available\r\n  // but I have no idea how to \"get\" the component \"path\"\r\n\r\n  const Form = reduxForm({\r\n    initialValues: model2form(data),\r\n    form: 'order', // <-- this should have unique value in case I want to create more than one order form\r\n    fields: ['id', 'code', 'status'],\r\n  })(OrderForm); // <-- OrderForm is an actual form component which need to be wrapped by reduxForm\r\n\r\n  return (\r\n    <Form {...props} />\r\n  );\r\n};\r\n```"}}
{"actor":{"display_login":"jmarceli"}}