This is a nice library. I am using it in a development privacy SDK framework with SwiftUI. The UIKit main app will call it. So, I was using UIHostingController.
This is a Infinite loop code.
UIHostingController(rootView: NBNavigationStack(root: { Text("") }).nbUseNavigationStack(.whenAvailable))