Gamote / lottie-react

A lightweight React library for rendering complex After Effects animations in real time using Lottie.
https://lottiereact.com
Other
786 stars 59 forks source link

Export LottieRefCurrentProps for typescript #105

Closed kyeshmz closed 6 months ago

kyeshmz commented 11 months ago

Is your feature request related to a problem? Please describe. LottieRefCurrentProps is not exported, so my refs need to be any.

Describe the solution you'd like

Export LottieRefCurrentProps so that I can use to pass ref to my

  const outAnimRef = useRef<LottieRefCurrentProps>(null)
 <Lottie
          lottieRef={outAnimRef}

Describe alternatives you've considered If everyone else is doing it another way, I wanna know too

Additional context Add any other context or screenshots about the feature request here.

lachieh commented 10 months ago

It is exported: https://github.com/Gamote/lottie-react/blob/fed9aa1399ed37e4ac95139031c691087f0913ba/src/types.ts#L16-L34

You can import it with:

import {LottieRefCurrentProps} from 'lottie-react';

If you're having trouble with the import, create a reduced test case on codesandbox that shows the problem you're having.