react-marquee
react-marquee copied to clipboard
Maybe translate3d() has better performance than simple position right?
how about this one ?
const style = {
//'position': 'static',
'position': 'relative',
'display': 'inline-block',
//'right': this.state.animatedWidth,
'transform': `translate3d(-${this.state.animatedWidth}px, 0px, 0px)`,
'whiteSpace': 'nowrap'
};
It is better indeed, this repo was built under the consideration of legacy browser support, so I choose setTimeout
.
You're very welcome to send some PRs to make it happen.
Only measureText
on ~~render~~ receiving props would help too