2 ms·
You know, I never really understood why ViewModifier exists at all. How is it different from an extension on View?
by saagarjha 3y ago
You know, I never really understood why ViewModifier exists at all. How is it different from an extension on View?
- TheNightman 3y agoA viewmodifier can have its own @State, etc. I can’t think of anything that couldn’t be accomplished with an extension on View with a few tricks but ViewModifiers are easier & cleaner IMO. I usually have a ViewModifier along with an extension on view used to apply it