Ok, so I figured it out. The key was the CSS property of the fill animation. I completely removed all React Animations and started using it with CSS only.
Here's the code, if anyone is interested:
CSS
@keyframes flyInFromBottom { 0%{ opacity: 0; transform: translateY(100vh); } 100%{ opacity: 1; }
}
JSX:
<Card style={{ animation: 'flyInFromBottom 0.3s ease ' + (index+1)*0.1 + 's', float: 'left', width: 'calc(50% - 4px)', margin: '2px', opacity: '0', animationFillMode: 'forwards' }} key={index} onTouchTap={this.goToCourse}> <CardMedia> <img src={"img/courses/" + index + ".png"} /> </CardMedia> <CardTitle> {element} </CardTitle> </Card>
Essentially, I changed the properties using CSS and saved them using the animation fill mode.
source share