{"action":"opened","issue":{"url":"https://api.github.com/repos/rackt/react-redux/issues/141","labels_url":"https://api.github.com/repos/rackt/react-redux/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-redux/issues/141/comments","events_url":"https://api.github.com/repos/rackt/react-redux/issues/141/events","html_url":"https://github.com/rackt/react-redux/issues/141","id":110354173,"number":141,"title":"Connect's wrapped component can't be a stateless function","user":{"login":"dariocravero","id":376268,"avatar_url":"https://avatars.githubusercontent.com/u/376268?v=3","gravatar_id":"","url":"https://api.github.com/users/dariocravero","html_url":"https://github.com/dariocravero","followers_url":"https://api.github.com/users/dariocravero/followers","following_url":"https://api.github.com/users/dariocravero/following{/other_user}","gists_url":"https://api.github.com/users/dariocravero/gists{/gist_id}","starred_url":"https://api.github.com/users/dariocravero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dariocravero/subscriptions","organizations_url":"https://api.github.com/users/dariocravero/orgs","repos_url":"https://api.github.com/users/dariocravero/repos","events_url":"https://api.github.com/users/dariocravero/events{/privacy}","received_events_url":"https://api.github.com/users/dariocravero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-08T01:27:14Z","updated_at":"2015-10-08T01:27:14Z","closed_at":null,"body":"If the component wrapped with `connect` is a stateless function component, React warns about the [internal ref](https://github.com/rackt/react-redux/blob/master/src/components/createConnect.js#L203) that the wrapper holds with the following message `Warning: Stateless function components cannot be given refs (See ref \"wrappedInstance\" in App created by Connect(App)). Attempts to access this ref will fail.`\r\n\r\n```\r\nimport { connect } from 'react-redux';\r\nimport React from 'react';\r\n\r\nexport default connect(mapStateToProps)(props => <div />);\r\n```\r\n\r\nWould it be useful to check whether the component is stateless or not and then apply the ref or do we always need it?"}}