This is a companion discussion topic for the original entry at https://www.raywenderlich.com/10877734-reusable-swiftui-views-in-the-raywenderlich-com-app/lessons/3
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/10877734-reusable-swiftui-views-in-the-raywenderlich-com-app/lessons/3
1 Like
In Extensions/Color+Extensions.swift and Font+Extensions.swift the code uses static var computed properties versus static let constants. As Catie noted, the code in the tutorial lesson is exactly as found in the production release of the raywenderlich iOS app. So, why use static var vs. static let? After a little digging, I found a good discussion here: static computed property vs static let constant
Why did RW developers choose to use static var?