DEV Community

Discussion on: Three ways to react to @State event changes in SwiftUI

Collapse
 
tr3ntg profile image
Trent

Calin, this writeup was great. I was pretty stuck...

Without understanding why it worked, I used method 3 in one part of my codebase (before finding your article) and later tried to adapt the usage of @didset inside of my viewModel on the @State variables. 🤦‍♂️

Still working on the refactor, but this clarified a lot. Thanks for saving me the trouble.

Collapse
 
calin_crist profile image
Calin-Cristian Ciubotariu

Hi, Trent! I am really happy it helped you :)

I was in the same situation as you. It required more internet research than expected (at that time at least).
Either way, I feel SwiftUI has a pretty steep learning curve and searching for specific patterns requires a lot of googling + trial and error.