We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I had trouble to get ref working on one of my composite components.
ref
This inline ref function
<MyComp ref={element => this.listElement = element}/>
will always be called with element===null on mount and unmount the like. Thats because MyComp is a stateless/functional component.
element===null
MyComp
react should print a warning if one tries to use ref with stateless components.
The text was updated successfully, but these errors were encountered:
I think stateless component just a tool, so in my options, this is unnecessary.
stateless component
Sorry, something went wrong.
This issue can be closed because I believe it has been resolved by: #8635
@Maximilianos thanks!
No branches or pull requests
I had trouble to get
ref
working on one of my composite components.This inline ref function
<MyComp ref={element => this.listElement = element}/>
will always be called with
element===null
on mount and unmount the like. Thats becauseMyComp
is a stateless/functional component.react should print a warning if one tries to use
ref
with stateless components.The text was updated successfully, but these errors were encountered: