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
react 16 以上是不是不能用了 ref报错
The text was updated successfully, but these errors were encountered:
改成回调方式吧,兼容性更好
Sorry, something went wrong.
相同的问题:Element ref was specified as a string (imagelist) but no owner was set
edit index.js
<!-- just change --> <ul id="imagelist" ref="imagelist" className="imagelist"> <!-- to --> <ul id="imagelist" ref={ref => this.list = ref} className="imagelist">
and
// delete this.list = this.refs['imagelist']; // it'll be fine
No branches or pull requests
react 16 以上是不是不能用了 ref报错
The text was updated successfully, but these errors were encountered: