question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connected components may not be stateless

See original GitHub issue

https://github.com/reactjs/react-redux/issues/141

The component returned by connect doesn’t allow for refs ie <Component ref='foobar' />. React gives warning “Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.”

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
matheusmlcommented, Aug 16, 2018

Yes it is, @leobetosouza

1reaction
leobetosouzacommented, Aug 15, 2018

I need this feature… I will work on it after #119

Read more comments on GitHub >

github_iconTop Results From Across the Web

What does "Stateless function components cannot be given ...
In React, refs may not be attached to a stateless component. React Redux 3 attaches a ref to the component you give it...
Read more >
Components: stateful, stateless, dumb and smart
Knowing them and understanding their differences is not only important, ... A stateless component is a component without an internal state.
Read more >
Stateful vs stateless
The state of an application (or anything else, really) is its condition or quality of being at a given moment in time—its state...
Read more >
Stateful vs. Stateless: Understanding the Key Differences
Stateful tracks information about a connection's or application's state, while stateless does not. Learn the 10 differences between these ...
Read more >
Stateful and Stateless Components in React
Notice the stateless component is written as a function. As cool as state is, you should always aim to make your components as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found