New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracks have persistent IDs #2

merged 1 commit into from Dec 10, 2018


None yet
2 participants

Hamled commented Dec 6, 2018

This is important for implementations where the favorite-d status is being stored in state on the Track component.

In that situation, when a track is moved to the top of the playlist, the index-based keys code would cause React to believe that the track which is now in the position of the track that was moved to the top of the list, is the one which still has the favorite status.

(Basically, if you don't do this then "favorite" status is more associated with a particular index in the track list, rather than a particular track.)

@Hamled Hamled requested a review from droberts-ada Dec 6, 2018

@droberts-ada droberts-ada merged commit a92d7fc into master Dec 10, 2018

@droberts-ada droberts-ada deleted the track-key-persistent branch Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment