Challenge: Stacks & ForEach | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/18272812-swiftui-fundamentals/lessons/9

Thanks for the course, Iโ€™m already learning a lot!

One question, just to be sure. The idea behind extracting a view into a subview is to improve code readability in the parent component rather than improving reusability for repeated components, right?

If I have a view that takes multiple lines of code but itโ€™s only used once within the parent view, should I create a subview from that? Whatโ€™s the code convention?

Bravo! Excellent material! Very well done!