I'm trying to implement an infinite from bottom to top spinning wheel. So far I got the following:

What's working:
- It's spins from bottom to top
- It starts with the first string again after reaching the end
What I want/what's incorrect:
I want the animation to be infinite, in other words, there's supposed to be no transition. When the animation reaches its last element, it must not jump back to its first, but smoothly attach it to its bottom to create a ongoing from bottom to top animation.
How can I implement such behavior? To achieve the given effect I used js - do I need some more js or fall back to plain css animation?
class Spinner extends Component {
state = {
active: 0
};
interval;
componentDidMount() {
this.interval = setInterval(() => {
this.setState({active: this.state.active === this.props.content.length - 1 ? 0 : this.state.active + 1});
}, 1000);
}
componentWillUnmount() {
clearInterval(this.interval);
}
setPosition = () => {
const n = 100 / this.props.content.length;
return n * this.state.active * -1;
};
render() {
const style = {
transform: 'translateY(' + this.setPosition() + '%)'
};
return (
<div className="spinner--list d-inline-block align-self-start">
<ul className="p-0 m-0" style={style}>
{
this.props.content.map((item, index) => {
return (
<li key={index}>
<h1>{item}</h1>
</li>
);
})
}
</ul>
</div>
);
}
}
.spinner--list {
max-height: calc((10px + 2vw) * 1.5);
overflow: hidden;
}
.spinner--list ul {
list-style-type: none;
transition: transform 1s;
will-change: transform;
}
.spinner--container h1 {
font-size: calc(10px + 2vw);
line-height: 1.5;
margin: 0;
}