Multiple EnvironmentObjects in SwiftUI

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 8

  • @mdfasiuddinraihan2049
    @mdfasiuddinraihan2049 Рік тому

    Well explained 👍🏻

  • @uniquecrafter4432
    @uniquecrafter4432 2 роки тому +1

    Extremely useful video. Thanks a lot! I had exactly this problem and couldn’t fix it in an app that I’m working on.

  • @gregohb
    @gregohb 2 роки тому

    Nice concise example, thanks!

  • @benceylan273
    @benceylan273 2 роки тому

    very informative video, thank you

  • @yhmlco
    @yhmlco 2 роки тому

    Ummm... I'd question your terminology here. The view is dependent on the state, so the view body will be *evaluated* in order to see if there are any changes that need to be *rendered*. If there are no apparent changes, then it's not rendered (e.g. changes redrawn to the screen).
    Evaluating the view tree and rendering the resulting changes are two different operations. That said, and as mentioned, the technique has a lot of merit in large applications as it can greatly minimize the number of views in the tree that need to be evaluated on any given state change.
    Pedantic, yes, but "rendered" has a rather specific meaning.