{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/3860","labels_url":"https://api.github.com/repos/facebook/react/issues/3860/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/3860/comments","events_url":"https://api.github.com/repos/facebook/react/issues/3860/events","html_url":"https://github.com/facebook/react/issues/3860","id":75763079,"number":3860,"title":"Documentation for controlled components seems contradictory","user":{"login":"jedwards1211","id":1448194,"avatar_url":"https://avatars.githubusercontent.com/u/1448194?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards1211","html_url":"https://github.com/jedwards1211","followers_url":"https://api.github.com/users/jedwards1211/followers","following_url":"https://api.github.com/users/jedwards1211/following{/other_user}","gists_url":"https://api.github.com/users/jedwards1211/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards1211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards1211/subscriptions","organizations_url":"https://api.github.com/users/jedwards1211/orgs","repos_url":"https://api.github.com/users/jedwards1211/repos","events_url":"https://api.github.com/users/jedwards1211/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards1211/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react/labels/Component:%20Documentation%20&%20Website","name":"Component: Documentation & Website","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-12T22:31:08Z","updated_at":"2015-10-26T16:56:01Z","closed_at":null,"body":"In the documentation for [controlled components](https://facebook.github.io/react/docs/forms.html#controlled-components), it says:\r\n\r\n```\r\nForm components allow listening for changes by setting a callback to the onChange prop. The onChange prop works across browsers to fire in response to user interactions when:\r\n\r\nThe value of <input> or <textarea> changes.\r\nThe checked state of <input> changes.\r\n```\r\n\r\nHowever my checkbox's onChange handler is getting called even though its checked state dosen't actually change, because it's controlled.  I think the documentation should be changed to state that onChange is fired in response to user input on the component, even if React leaves the component state as it is."},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/151207968","html_url":"https://github.com/facebook/react/issues/3860#issuecomment-151207968","issue_url":"https://api.github.com/repos/facebook/react/issues/3860","id":151207968,"user":{"login":"zpao","id":8445,"avatar_url":"https://avatars.githubusercontent.com/u/8445?v=3","gravatar_id":"","url":"https://api.github.com/users/zpao","html_url":"https://github.com/zpao","followers_url":"https://api.github.com/users/zpao/followers","following_url":"https://api.github.com/users/zpao/following{/other_user}","gists_url":"https://api.github.com/users/zpao/gists{/gist_id}","starred_url":"https://api.github.com/users/zpao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpao/subscriptions","organizations_url":"https://api.github.com/users/zpao/orgs","repos_url":"https://api.github.com/users/zpao/repos","events_url":"https://api.github.com/users/zpao/events{/privacy}","received_events_url":"https://api.github.com/users/zpao/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T16:56:01Z","updated_at":"2015-10-26T16:56:01Z","body":"I'm not sure what these bugs are… (unless it's about us having to use other events to simulate `change`).\r\n\r\nEverything with checkboxes appears to be working as expected to me and checkboxes are behaving the same way (eg, logging `e.target.checked` in an `onChange` callback tells me the right value, even if I don't call `setState`)."}}