-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I was trying to create a ref in Tweenful.div, but it appears that the it's a function component wrapper, so React shows warnings as following:
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
In my constructor I created a ref
this.container = React.createRef();And this is my code using Tweenful.div
<Tweenful.div
ref={this.container}
className="tween-box row ml-2 mb-2 mr-2 mt-2"
duration={1500}
easing={elastic(1, 0.25)}
style={{ position: 'relative' }}
animate={animate}>
// child components
</Tweenful.div>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels