Passing Arguments Best Practices

I’m working with Jetpack Compose, but the same goes for XML. I need to pass a list of objects from one screen to another. Let me explain. I’m building a custom section where the user can create her own workout. But she needs to do different steps. The first is selecting the exercises she wants in the custom workout. The second is to choose how many repetitions she wants to do. And the last choosing the name of the workout and the cover picture. All of these steps are made on different screens.

Now, I know google says that has never been a recommended pattern to pass Parcelables. They suggest instead of saving stuff on the database and fetching it in the other screens where you need to use it. But in my case it doesn’t make much sense. Should I use a shared ViewModel? What’s the best practice to do so?

submitted by /u/____Mattia____
[link] [comments]