{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/603","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/603/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/603/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/603/events","html_url":"https://github.com/erikras/redux-form/issues/603","id":129565993,"node_id":"MDU6SXNzdWUxMjk1NjU5OTM=","number":603,"title":"Dynamic form name","user":{"login":"tricoder42","id":827862,"node_id":"MDQ6VXNlcjgyNzg2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/827862?v=4","gravatar_id":"","url":"https://api.github.com/users/tricoder42","html_url":"https://github.com/tricoder42","followers_url":"https://api.github.com/users/tricoder42/followers","following_url":"https://api.github.com/users/tricoder42/following{/other_user}","gists_url":"https://api.github.com/users/tricoder42/gists{/gist_id}","starred_url":"https://api.github.com/users/tricoder42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tricoder42/subscriptions","organizations_url":"https://api.github.com/users/tricoder42/orgs","repos_url":"https://api.github.com/users/tricoder42/repos","events_url":"https://api.github.com/users/tricoder42/events{/privacy}","received_events_url":"https://api.github.com/users/tricoder42/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-01-28T20:13:14Z","updated_at":"2018-09-07T00:30:09Z","closed_at":"2016-01-28T20:49:21Z","author_association":"NONE","body":"According to docs:\n\n> All of these configuration options may be passed into reduxForm() at \"design time\" or passed in as props to your component at runtime.\n\nHowever, when I try to use dynamic form name based on ID (which doesn't change), I see `form: undefined` in redux-logger for all form related actions.\n\nSomething like:\n\n``` javascript\nconst DynamicForm = reduxForm(\n  {\n    fields: [\"message\"]\n  },\n  (state, props) => ({\n    form: props.id\n  })\n)(DynamicFormComponent);\n```\n\n---\n\nWhen I pass `form` parameter in props (`<DynamicForm form={id} />`, everything works.\n\nWhat do I miss?\n"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/419283111","html_url":"https://github.com/erikras/redux-form/issues/603#issuecomment-419283111","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/603","id":419283111,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTI4MzExMQ==","user":{"login":"jhonnymoreira","id":2177742,"node_id":"MDQ6VXNlcjIxNzc3NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/2177742?v=4","gravatar_id":"","url":"https://api.github.com/users/jhonnymoreira","html_url":"https://github.com/jhonnymoreira","followers_url":"https://api.github.com/users/jhonnymoreira/followers","following_url":"https://api.github.com/users/jhonnymoreira/following{/other_user}","gists_url":"https://api.github.com/users/jhonnymoreira/gists{/gist_id}","starred_url":"https://api.github.com/users/jhonnymoreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhonnymoreira/subscriptions","organizations_url":"https://api.github.com/users/jhonnymoreira/orgs","repos_url":"https://api.github.com/users/jhonnymoreira/repos","events_url":"https://api.github.com/users/jhonnymoreira/events{/privacy}","received_events_url":"https://api.github.com/users/jhonnymoreira/received_events","type":"User","site_admin":false},"created_at":"2018-09-07T00:30:09Z","updated_at":"2018-09-07T00:30:09Z","author_association":"NONE","body":"I know it has been a while, but I'm using `redux-form` v7 and I'm using the example to create a Wizard with two reusable form components. For those willing to achieve the same thing, this is pretty much how I did it:\r\n\r\n```js\r\nimport React from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm } from 'redux-form'\r\n\r\nconst Component = () => {}\r\n\r\nconst ComponentForm = reduxForm({\r\n  destroyOnUnmount: false,\r\n  forceUnregisterOnUnmount: true,\r\n})(Component)\r\n\r\nconst mapStateToProps = (_, { form }) => ({\r\n  form: form || 'leetName',\r\n})\r\n\r\nexport default connect(mapStateToProps)(PageOneForm)\r\n```\r\n\r\nAnd then, when I render the `PageOneFormContainer` on the Wizard component, it goes like this:\r\n\r\n```jsx\r\n<PageOneFormContainer form=\"wizardForTheWin\" />\r\n```\r\n\r\nThis is the pretty much what you will need. Hope it helps somebody just as it helped me."}}
{"actor":{"display_login":"jhonnymoreira"}}