I'm looking for an elegant way to type Composable functions parameters. I'm used to React, where you pass a single props parameter without having to have a million of them.
For reference, what is the cleanest way to to something like this
interface MyCompProps {
foo: string
bar: number
}
function MyComp(props: MyCompProps) {...}
with Compose?
Do I have to create a class and instantiate one when I build the props? Do I use maps? Is it the wrong way of thinking about it?
Right now I'm doing something like
class ProjectListItemProps(
val imageUrl: String,
val projectName: String,
val createdAt: String
)
@Composable
fun ProjectListItem(props: ProjectListItemProps) {...}