Instead of using theHStack { Text(Hello) Text(World).italic() }Solution proposed above, you should use the + operator between Text() as mentioned in the link belowhttps://www.hackingwithswift.com/quick-start/swiftui/how-to-combine-text-views-togetherText(Hello) + Text(World) .italic()
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: