{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/react-proxy/issues/27","labels_url":"https://api.github.com/repos/gaearon/react-proxy/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/react-proxy/issues/27/comments","events_url":"https://api.github.com/repos/gaearon/react-proxy/issues/27/events","html_url":"https://github.com/gaearon/react-proxy/issues/27","id":108006644,"number":27,"title":"Proxy'd component missing setState in IE 9/10","user":{"login":"kentor","id":240493,"avatar_url":"https://avatars.githubusercontent.com/u/240493?v=3","gravatar_id":"","url":"https://api.github.com/users/kentor","html_url":"https://github.com/kentor","followers_url":"https://api.github.com/users/kentor/followers","following_url":"https://api.github.com/users/kentor/following{/other_user}","gists_url":"https://api.github.com/users/kentor/gists{/gist_id}","starred_url":"https://api.github.com/users/kentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentor/subscriptions","organizations_url":"https://api.github.com/users/kentor/orgs","repos_url":"https://api.github.com/users/kentor/repos","events_url":"https://api.github.com/users/kentor/events{/privacy}","received_events_url":"https://api.github.com/users/kentor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gaearon/react-proxy/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-09-23T21:08:02Z","updated_at":"2015-10-19T18:13:42Z","closed_at":null,"body":"```js\r\nconst React = require('react');\r\nconst { createProxy } = require('react-proxy');\r\n\r\nconst Component = React.createClass({\r\n  getInitialState() {\r\n    return { text: 'hi' };\r\n  },\r\n\r\n  componentDidMount() {\r\n    this.setState({ text: 'hey' });\r\n  },\r\n\r\n  render() {\r\n    return <span>{this.state.text}</span>;\r\n  },\r\n});\r\n\r\nconst proxy = createProxy(Component);\r\nconst Proxy = proxy.get();\r\n\r\nconst element = <Proxy />;\r\n\r\nReact.render(element, document.getElementById('root'));\r\n```\r\n\r\nOnly in IE9:\r\n```\r\nWarning: Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory \r\nSCRIPT438: Object doesn't support property or method 'setState'\r\n```\r\n\r\ndid not test 10, ok in 11, Edge, Chrome, FF. testing repo: https://github.com/kentor/react-transform-hmr-ie9\r\n\r\nPretty stumped on this one... \r\n\r\n![screen shot 2015-09-23 at 1 58 29 pm](https://cloud.githubusercontent.com/assets/240493/10058698/b842f278-61fb-11e5-8f21-1530e10f3f22.png)\r\n\r\nI put a debugger on where the Warning would have been emitted and went up the call stack to see what's different from the other browsers. Also here `this instanceof Constructor` returns `false` in ie9 vs other browsers.\r\n\r\n![screen shot 2015-09-23 at 1 59 35 pm](https://cloud.githubusercontent.com/assets/240493/10058708/c4fb4c36-61fb-11e5-9d47-93e6557432ce.png)\r\n\r\nThis is a place of suspicion.\r\n\r\n![screen shot 2015-09-23 at 2 00 08 pm](https://cloud.githubusercontent.com/assets/240493/10058744/f530d04c-61fb-11e5-850c-fa4725182ef0.png)\r\n\r\n I set the `internalInstance` to a variable and then went down a stack frame\r\n\r\n![screen shot 2015-09-23 at 2 00 24 pm](https://cloud.githubusercontent.com/assets/240493/10058762/ff82a688-61fb-11e5-9e2b-550e767a1386.png)\r\n\r\n`this` which should have been the caller, `internalInstance`, is not the case in ie9 vs other browsers."},"comment":{"url":"https://api.github.com/repos/gaearon/react-proxy/issues/comments/149301787","html_url":"https://github.com/gaearon/react-proxy/issues/27#issuecomment-149301787","issue_url":"https://api.github.com/repos/gaearon/react-proxy/issues/27","id":149301787,"user":{"login":"nhunzaker","id":590904,"avatar_url":"https://avatars.githubusercontent.com/u/590904?v=3","gravatar_id":"","url":"https://api.github.com/users/nhunzaker","html_url":"https://github.com/nhunzaker","followers_url":"https://api.github.com/users/nhunzaker/followers","following_url":"https://api.github.com/users/nhunzaker/following{/other_user}","gists_url":"https://api.github.com/users/nhunzaker/gists{/gist_id}","starred_url":"https://api.github.com/users/nhunzaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhunzaker/subscriptions","organizations_url":"https://api.github.com/users/nhunzaker/orgs","repos_url":"https://api.github.com/users/nhunzaker/repos","events_url":"https://api.github.com/users/nhunzaker/events{/privacy}","received_events_url":"https://api.github.com/users/nhunzaker/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T18:13:42Z","updated_at":"2015-10-19T18:13:42Z","body":"Dropping <= IE10 support is fine by me as long as it's done in a clean way. I would love for browsers that don't have access to `__proto__` to not receive hot-loading treatment and display a warning in the console instead if at all possible.\r\n\r\nRight now I just export an environment variable in my build to disable hot loading when testing in IE10 (`HOT=FALSE npm start`) this works fine, but I'd love to not have to worry about it."}}