I've heard the most popular way to define screen and route is to use sealed class
But I can't understand intuitively that way.
first is Why use sealed class. there are other classes including just the default class.
The second is Why use object in sealed class.
I think the second question is have a relation to a singleton. But why screen should be a singleton?
this is code what I've seen
sealed class Screen(val route: String) {
object Home: Screen(route = "home_screen")
object Detail: Screen(route = "detail_screen")
}