Open ruizj-ibm opened 6 years ago
I am having an issue when the props.children change for an <Anime>.
<Anime>
To solve my issue, I made this change to function componentWillReceiveProps in react-anime.js file:
function componentWillReceiveProps
this.children = { /* cur: children.filter(function (c) { return difChildren.indexOf(c) < 0; }), */ cur: children, prev: childrenWereRemoved ? difChildren : this.children.prev, next: !childrenWereRemoved ? difChildren : this.children.next };
For some reason, the filter was returning zero children, even though there was a child component.
I am using anime like this;
//inside parent component <FadeIn>{messageWords}</FadeIn> let FadeIn = props => { return ( <Anime easing="linear" autoplay={true} duration={500} direction="normal" loop={false} opacity={[0, 1]} delay={(el, index) => ((index * 200) + 1500)}> {props.children} </Anime> ) }
+1 on this -- discovered this while playing with react-anime today.
Thanks @ruizj-ibm for the fix, it seems to have solved my issue!
+1 the same problem
I am having an issue when the props.children change for an
<Anime>
.To solve my issue, I made this change to
function componentWillReceiveProps
in react-anime.js file:For some reason, the filter was returning zero children, even though there was a child component.
I am using anime like this;