{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/206","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/206/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/206/events","html_url":"https://github.com/erikras/redux-form/issues/206","id":114530887,"number":206,"title":"What is minimum I have to pass so form will update to state.","user":{"login":"thedamon","id":1375267,"avatar_url":"https://avatars.githubusercontent.com/u/1375267?v=3","gravatar_id":"","url":"https://api.github.com/users/thedamon","html_url":"https://github.com/thedamon","followers_url":"https://api.github.com/users/thedamon/followers","following_url":"https://api.github.com/users/thedamon/following{/other_user}","gists_url":"https://api.github.com/users/thedamon/gists{/gist_id}","starred_url":"https://api.github.com/users/thedamon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedamon/subscriptions","organizations_url":"https://api.github.com/users/thedamon/orgs","repos_url":"https://api.github.com/users/thedamon/repos","events_url":"https://api.github.com/users/thedamon/events{/privacy}","received_events_url":"https://api.github.com/users/thedamon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-02T06:06:47Z","updated_at":"2015-11-08T08:55:15Z","closed_at":null,"body":"I would love to see some examples of onSubmit etc. All the examples I see seem to reinitialize the form to a blank state, but I don't see where the Redux state is being updated. And I'm not sure how much sate-updating is done by default through the redux-form library. So I'm trying to figure out what to put into my `onSubmit` etc but the examples are not reducing my confusion..\r\n\r\nSay I have a singular `applicant` object in my state with a name field.\r\n```\r\nclass App extends React.Component {\r\nrender() { return(\r\n<ApplicantForm\r\n  initialValues={this.props.applicant}\r\n  onSubmit={updateApplicant} //the action for updating applicants\r\n/>\r\n);}\r\nexport default connect((state)=>state)(AdvancedMode);\r\n}\r\n```\r\n```\r\nclass ApplicantForm extends Component {\r\n\trender() {\r\n\t\tconst {fields: {name}, handleSubmit} = this.props;\r\n\t\treturn (\r\n\t\t\t<form onsubmit={handleSubmit}>\r\n\t\t\t\t<label>Name:</label><input type=\"text\" {...name} />\r\n\t\t\t\t<input type=\"submit\" value=\"save\" onClick={handleSubmit}/>\r\n\t\t\t</form>\r\n\t\t);\r\n\t}\r\n}\r\n\r\nApplicantForm = reduxForm({\r\n\tform: 'applicant',\r\n\t['name']\r\n})(ApplicantForm);\r\n\r\nexport default ApplicantForm;\r\n```\r\nWith this setup it is updated, and re-renders on change and submit, but when I submit, it ends up with a 'redux-form/TOUCH' action and never actually updates the applicant in state.\r\n\r\nmy reducer looks like:\r\n```\r\nfunction applicant(state = {}, action){\r\n\tswitch (action.type) {\r\n\tcase UPDATE_APPLICANT:\r\n\t\treturn Object.assign({}, state, action.applicant);\r\n\tdefault:\r\n\t\treturn state;\r\n\t}\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/154790007","html_url":"https://github.com/erikras/redux-form/issues/206#issuecomment-154790007","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/206","id":154790007,"user":{"login":"anorudes","id":2178870,"avatar_url":"https://avatars.githubusercontent.com/u/2178870?v=3","gravatar_id":"","url":"https://api.github.com/users/anorudes","html_url":"https://github.com/anorudes","followers_url":"https://api.github.com/users/anorudes/followers","following_url":"https://api.github.com/users/anorudes/following{/other_user}","gists_url":"https://api.github.com/users/anorudes/gists{/gist_id}","starred_url":"https://api.github.com/users/anorudes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anorudes/subscriptions","organizations_url":"https://api.github.com/users/anorudes/orgs","repos_url":"https://api.github.com/users/anorudes/repos","events_url":"https://api.github.com/users/anorudes/events{/privacy}","received_events_url":"https://api.github.com/users/anorudes/received_events","type":"User","site_admin":false},"created_at":"2015-11-08T08:55:15Z","updated_at":"2015-11-08T08:55:15Z","body":">I would love to see some examples of onSubmit etc.\r\n+1"}}