{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/1405","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/1405/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/1405/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/1405/events","html_url":"https://github.com/erikras/redux-form/issues/1405","id":167771569,"number":1405,"title":"[v6] Why do all fields re-render when a single field changes?","user":{"login":"andrewmclagan","id":1073259,"avatar_url":"https://avatars.githubusercontent.com/u/1073259?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewmclagan","html_url":"https://github.com/andrewmclagan","followers_url":"https://api.github.com/users/andrewmclagan/followers","following_url":"https://api.github.com/users/andrewmclagan/following{/other_user}","gists_url":"https://api.github.com/users/andrewmclagan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmclagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmclagan/subscriptions","organizations_url":"https://api.github.com/users/andrewmclagan/orgs","repos_url":"https://api.github.com/users/andrewmclagan/repos","events_url":"https://api.github.com/users/andrewmclagan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmclagan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-07-27T05:06:47Z","updated_at":"2016-10-29T06:36:28Z","closed_at":null,"body":"Im sure this has been answered.\r\n\r\nTracing component updates in the console  shows on every: keypress and update event **ALL** fields are re-rendered. This seems like a performance bottle neck with large forms? \r\n\r\nAlready when I try to type fast in a  `<textarea />` its slow, much slower then non-redux-form."},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/257074669","html_url":"https://github.com/erikras/redux-form/issues/1405#issuecomment-257074669","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/1405","id":257074669,"user":{"login":"bertjwregeer","id":649426,"avatar_url":"https://avatars.githubusercontent.com/u/649426?v=3","gravatar_id":"","url":"https://api.github.com/users/bertjwregeer","html_url":"https://github.com/bertjwregeer","followers_url":"https://api.github.com/users/bertjwregeer/followers","following_url":"https://api.github.com/users/bertjwregeer/following{/other_user}","gists_url":"https://api.github.com/users/bertjwregeer/gists{/gist_id}","starred_url":"https://api.github.com/users/bertjwregeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bertjwregeer/subscriptions","organizations_url":"https://api.github.com/users/bertjwregeer/orgs","repos_url":"https://api.github.com/users/bertjwregeer/repos","events_url":"https://api.github.com/users/bertjwregeer/events{/privacy}","received_events_url":"https://api.github.com/users/bertjwregeer/received_events","type":"User","site_admin":false},"created_at":"2016-10-29T06:36:28Z","updated_at":"2016-10-29T06:36:28Z","body":"@smirea If you don't call `onChange` then `value` is never updated, so you end up with a form field that won't let you input any data (since it is not round-tripping to React for a DOM refresh).\r\n\r\nYou'd have to make the form component stateless by removing value from the props passed to `<input>` but then you can't have redux form provide an initial value...\r\n\r\nI ended up with this, and it seems to work (probably some corner case I am missing somewhere...)\r\n\r\n```\r\nexport class inputOnBlur extends Component {\r\n    state = {\r\n        value: '',\r\n    }\r\n\r\n    componentWillMount = () => {\r\n        const { input: { value } } = this.props;\r\n\r\n        this.setState({value: value});\r\n    }\r\n\r\n    componentWillReceiveProps = (nextProps) => {\r\n        const { input: { value } } = nextProps;\r\n\r\n        this.setState({value: value});\r\n    }\r\n\r\n    onChange = (e) => {\r\n        this.setState({value: e.target.value});\r\n    }\r\n\r\n    render() {\r\n        const { input, type, placeholder } = this.props;\r\n\r\n        delete input.onChange;\r\n        delete input.value;\r\n\r\n        input.value = this.state.value;\r\n        input.onChange = this.onChange;\r\n\r\n        return (\r\n                   <input type={type} placeholder={placeholder} {...input} />\r\n               );\r\n    }\r\n```"}}
{"actor":{"display_login":"bertjwregeer"}}