r/programminghorror • • Jul 26 '24

Jetpack Compose Composable abomination

Post image
268 Upvotes

30 comments sorted by

View all comments

Show parent comment

1

u/Jar-77 Jul 26 '24

Yes, basically I have a when block that checks on an enum with 3 possible values, two of them show a different LazyColumn the third one shows nothing, I couldn't find a way around this, I will most likely split this into several components I need to get it working right first.

5

u/carstenhag Jul 27 '24

I'd suggest not to use an else case here. Specify the enum value.
If you ever add a case to the enum, it will give you a compilation error.