-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
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报错 #16
Comments
改成回调方式吧,兼容性更好 |
相同的问题: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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
react 16 以上是不是不能用了 ref报错
The text was updated successfully, but these errors were encountered: