swiftui-view-lifecycle icon indicating copy to clipboard operation
swiftui-view-lifecycle copied to clipboard

Add the .task modifier to view its lifecycle

Open MrRooni opened this issue 1 year ago • 1 comments

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:

Simulator Screen Shot - iPhone 14 Pro - 2023-03-18 at 10 24 13

Possible Impacts

This is fairly straightforward, I don't foresee any adverse effects.

MrRooni avatar Mar 18 '23 15:03 MrRooni

Thanks

lgreydev avatar Oct 08 '23 12:10 lgreydev