Modifying SwiftUI view added as a subview to UIKit View

I have a UIKit application and I have some swiftUI views(like button widget etc) that I m using in this application which are added as a subview using UIHostingController.

I wanted to understand what is the right way as per the apple recommendation on how to perform some updates on these views, since the UIKit and SwiftUI have a different way of operating.

In a pure swiftUI application we use the @State variables which when modified the view are re-rendered. However, in an UIKit application we can directly modify the widget property like color or font from the object.

So, my question is should I get the hostingController object from the swiftUI view and then perform any update on that UIKit view. Is this the right way?

If not, what is the correct way? can someone provide a detailed explanation?

Modifying SwiftUI view added as a subview to UIKit View
 
 
Q