doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.25k stars 1k forks source link

refactor: the docs now recommend using the remove function on the AppState subscription #2233

Closed Pnlvfx closed 5 months ago

Pnlvfx commented 9 months ago

This pull request addresses the deprecation of AppState.removeEventListener in favor of the recommended alternative in the React Native documentation. The changes ensure that the useAppIsInBackground hook remains up-to-date with the latest best practices.

React Native has deprecated AppState.removeEventListener in favor of a more robust and future-proof alternative. This change ensures that our codebase aligns with the latest recommendations, reducing the risk of issues in the future.

dcvz commented 9 months ago

@Pnlvfx do we know when this change was made in RN? We should make sure it'll work with the lowest RN version supported by RNTP as well.

Pnlvfx commented 9 months ago

I think it's from version 0.65 on. The peer of RNTP indicates 0.60 as the minimum. I think we have to wait to implement it.. Sorry boss

github-actions[bot] commented 6 months ago

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 5 months ago

This PR was closed because it has been stalled for 7 days with no activity.