swiftui-view-lifecycle
swiftui-view-lifecycle copied to clipboard
Add the .task modifier to view its lifecycle
Reason to Be
While reading up on the .task
modifier this morning, I wasn't quite sure if its lifecycle exactly matched .onAppear
and .onDisappear
. So, I decided to add it to this app and find out.
Related Reading:
Thought Process
I considered actually standing up a Task and tracking its lifecycle as well, to show how they are canceled, but decided to keep things very simple. If you'd like me to add that, I can.
How To Test
Build and run and load up some of the lifecycle views. You should see the new task entry:
Possible Impacts
This is fairly straightforward, I don't foresee any adverse effects.
Thanks