Describe the bug
I am getting waring (Module '"../../../../node_modules/react-native-track-player"' has no exported member 'useTrackPlayerProgress'.) when I am importing hook like usePlaybackState, useTrackPlayerProgress and useTrackPlayerEvents.
would you help me how i could fix this problem?
Code
`import TrackPlayer, {
usePlaybackState,
useTrackPlayerProgress,
useTrackPlayerEvents,
} from 'react-native-track-player';`
@itsgracian hey did you find a solution to this? I'm getting it also..
Hello, @TowhidKashem yes. uninstall react-native-track-player and install yarn add react-native-track-player@next
@TowhidKashem this hooks useTrackPlayerProgress was changed to useProgress
That will install v2 of the library though and I'm not 100% sure but I think that's still in beta (or at least it doesn't seem to me very stable from some comments). I think I'll just deal with the TS error with a ts-ignore ignore comment for now, although it doesn't make sense how it's even working with the renaming but it is.
I'm able to import them by reaching directly into the package's hooks directory:
import {
useTrackPlayerProgress,
useTrackPlayerEvents,
} from "react-native-track-player/lib/hooks"
I know the issue is closed, but maybe that will help anyone else who winds up reading this issue.
Hi, would you please release a new version with the fix?
Most helpful comment
I'm able to import them by reaching directly into the package's
hooksdirectory:I know the issue is closed, but maybe that will help anyone else who winds up reading this issue.