{"action":"opened","issue":{"url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/127","repository_url":"https://api.github.com/repos/Pomax/react-onclickoutside","labels_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/127/comments","events_url":"https://api.github.com/repos/Pomax/react-onclickoutside/issues/127/events","html_url":"https://github.com/Pomax/react-onclickoutside/issues/127","id":175375243,"number":127,"title":"Stateless component causes errors trying to read refs","user":{"login":"davishmcclurg","id":869489,"avatar_url":"https://avatars.githubusercontent.com/u/869489?v=3","gravatar_id":"","url":"https://api.github.com/users/davishmcclurg","html_url":"https://github.com/davishmcclurg","followers_url":"https://api.github.com/users/davishmcclurg/followers","following_url":"https://api.github.com/users/davishmcclurg/following{/other_user}","gists_url":"https://api.github.com/users/davishmcclurg/gists{/gist_id}","starred_url":"https://api.github.com/users/davishmcclurg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davishmcclurg/subscriptions","organizations_url":"https://api.github.com/users/davishmcclurg/orgs","repos_url":"https://api.github.com/users/davishmcclurg/repos","events_url":"https://api.github.com/users/davishmcclurg/events{/privacy}","received_events_url":"https://api.github.com/users/davishmcclurg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T23:21:23Z","updated_at":"2016-09-06T23:21:23Z","closed_at":null,"body":"Related: https://github.com/Pomax/react-onclickoutside/issues/98\r\n\r\nStateless component support was recently added, but seems to be broken. I tested this with a simple react app (I mostly wanted to try out Create React App): https://github.com/davishmcclurg/react-onclickoutside-issue\r\n\r\nThe stateless component is defined here: https://github.com/davishmcclurg/react-onclickoutside-issue/blob/master/src/App.js\r\n\r\nThis is what I see in the console:\r\n\r\n> Warning: Stateless function components cannot be given refs (See ref \"instance\" in StatelessComponent created by OnClickOutside(Component)). Attempts to access this ref will fail.\r\n\r\nAnd:\r\n\r\n> Uncaught TypeError: Cannot read property 'handleClickOutside' of null"}}
{"actor":{"display_login":"davishmcclurg"}}