Here is the moment at the end of the chapter, that describes “you need to add EnvironmentObject to ReaderView”:
- One as a property -
@EnvironmentObject var settings: Settings
- Second as pass param to SettingView -
.environmentObject(self.settings)
But, even if I’ll not do this - everything works as expected. So, what is the real reason to do this?
In challenges of 15.10 - yes, you need this, but before I don’t understand why this should be done
Can you explain, please?
3 posts - 2 participants