Let's think about it this way for a second
This round is about putting the Basic/Intermediate concepts you've already learned back into practice — telling Composable/State/Modifier apart, hunting down errors in Compose code, and using `remember` correctly are all things you'll do hands-on. No single task should take more than 5 minutes.
Let's connect this to a real scenario
Task 1: Explain the job of each of the three — '@Composable function', 'State (remember)', and 'Modifier' — in one sentence each. Task 2: Write `var count = 0` (no remember) inside a Composable function, imagine a Button that does `count++` on click, and predict what happens. Task 3: Write down, with an example, when you should reach for LazyColumn instead of Column. Task 4: If rotating the screen can wipe out `remember` state, which solution should you use?
Let's look at it together
# Task 2 - state without remember
var count = 0 // NOT wrapped in remember!
Button(onClick = { count++ }) { Text("Count: $count") }
Result: clicking the button triggers recomposition, but
since `count` is a plain local variable (not remember'd),
it resets to 0 every time recomposition runs — the UI
never visibly changes past "Count: 1" (it recomposes
before you can see anything higher).
# Task 4 - surviving rotation
Use rememberSaveable instead of remember for state that
must survive a configuration change (screen rotation).You'll come away with a clear grasp of the Composable/State/Modifier distinction, the remember-less state bug, and when to reach for rememberSaveable.Try it in 5 minutes
Write your own Composable, deliberately leave out `remember`, and let a state bug slip in — run it and see for yourself what happens.
One thing to watch out for
You don't need a physical device set up for this round — just focus your practice on the emulator (or the Preview panel).