I used krebera's example to solve the question I had. Wrap the view in Anyview by replacing CustomView with the view you want to use. So...
struct Whatever {
		 var view: AnyView
}
let myWhatever = Whatever(view: AnyView(Text("Bruh, krebera is rad, thank you sooooo much!")))
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: