cuappdev / cuappdev/resell-ios
Refactor environment object
- Dominant language
- Swift
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the MainView and MainTabView have many inject environment variables, but with our custom router and the navigation stack, some of the router pushed view may be disconnected from the original environment object, and the viewModels will be orphaned leading to inaccurate (two copies of data truth).
This is apparent because someone started manually injecting environment objects into the router views, meaning there is a disconnect from the original environment injection in MainView.
We should either figure how to stop the disconnect (I think it might be a swift issue so we might not be able to) or change to using @ObservedObject with a shared singleton for the view models that need one source of truth (Specifically HomeViewModel, maybe some others)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.