Abstract
This chapter shows SwiftUI @EnvironmentObject's capability to share state between different views and how to use tests to implement ViewModels that leverage it.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 Gio Lodi
About this chapter
Cite this chapter
Lodi, G. (2021). Injecting Dependencies with @EnvironmentObject. In: Test-Driven Development in Swift. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7002-8_11
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7002-8_11
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7001-1
Online ISBN: 978-1-4842-7002-8
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)