justin-chu / react-fast-marquee

A lightweight React component that harnesses the power of CSS animations to create silky smooth marquees.
https://react-fast-marquee.com
MIT License
1.16k stars 95 forks source link

[Feature Request] A callback function prop that executes after the marquee has finished rendering #65

Closed rubek-joshi closed 1 year ago

rubek-joshi commented 1 year ago

It would be really nice if there was a callback prop with the name along the lines of onRenderComplete or onRenderFinish so we can run some logic after the component has been successfully rendered.

An example use case for this would be to [refresh the scroll trigger of the GSAP](https://greensock.com/docs/v3/Plugins/ScrollTrigger/refresh()) library so it can recalculate measurements after the <Marquee /> component has been rendered.

tochibedford commented 1 year ago

@rubek-joshi this issue causes a layout shift which makes Gsap's measurements slight off, correct?