If the user wants to favorite channels and VOD movies, how would you handle that?
1- A list of [Channel] and [Movie] in your AccountStore (user state/data) ?
2- Or if we want to keep only the ID (eg. [Channel.ID] + [Movie.ID]), we need to map these ids to their object after app launch.
Is it the Account that access the data? or do you have a nested dependency to access the data only via ChannelStore and VODStore (requiring these stores load the data before to not have empty collection)
ChannelStore.load
VideoOnDemand.load
Account.load + map Channel/VOD.ID.
3- Can different store access the same underlying data via your Active record object? or if a View needs data from 2 different store to map them to a new object type.
4- Also curious about an active record example. what is inside these "..." in the static methods or functions.
Movie.all { ??? }
do you always call Webservice.shared.allMovies? are you using a cache? return Cacheservice.shared.allMovie ?? Webservice.shared.allmovies
thank you!
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: