Your Second iOS and SwiftUI App · Task Priority Modeling |

This is a companion discussion topic for the original entry at

Is there any reason, why not use priority as a property for Task instead of creating using PrioritizedTasks.

Because SwiftUI requires a RandomAccessCollection for List/ForEach, it would have been redundant and more complex to keep such a collection updated, for each priority/section.

I agree that it’s not ideal data modeling, but I also didn’t feel like addressing the above was appropriate for a beginner-level course. Hopefully next year we get better built-in support for bound collections!