I want to achieve the same result as this code, As I am using android navigation components what should I out in place of the fragment container as there is only NavHostFragment.
val newFragment = ExampleFragment()
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragment_container, newFragment)
transaction.addToBackStack(null)
transaction.commit()