Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29745

best way to handle Action redux in a music App - react native?

$
0
0

I'm implementing a music app,

In-Home screen "for-example" I get the lists of songs From API and when user press to any of them I dispatch an action "true/false" to appear the bottom mini-player

mini

after that should I save the songs array And save the currentIndex (song) in a redux state.

After that in the bottom mini-player should i appear the song name (based on data saved in the redux state) and pause icon.

Now when the user press on the mini-player I appear a full Modal that contains the Player controller Like this

conclusion

1-save all songs in redux state + currentIndex.

2-appear the mini-player contain the song name bassed on currentIndex song from redux.

3- Now when a user navigates to other screens Like genres and plays songs i want to repeat that's, So the array of songs should be in the blackList "i used redux-persist".

So is this right?


Viewing all articles
Browse latest Browse all 29745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>