Closed piaaaac closed 7 years ago
That means I should change the code from ref='modal'
to ref={this.createRef()}
??
and I want to know the reason
I'm getting an error in console due to legacy syntax
https://facebook.github.io/react/docs/refs-and-the-dom.html#legacy-api-string-refs
I could help with moving to new api
It would be something like this: from ref='modal'
to ref={(ref) => {this.refToModal = ref}}
and then use this.refToModal
to reference it elsewhere in the code
@alrykov Please help me to improve it. If you want to :) Pull requests are always welcome ;)
@piaaaac thanks I'll try
https://github.com/appleple/react-modal-video/blob/21f20f6c4e82e192953ad42518e6b22e1f5fca38/src/index.jsx#L105
lines 105 & 109.