State and Jetpack Compose
The Mystery
By Moro
Let’s learn about State in Compose
I want to eat pizza too.
Okay Scooby! Let’s use pizza in the example…
Imagine a screen when you will order a pizza!
Velma, I’m sad this app is so poor. Few flavors : (
This component doesn’t have state, so it is a Stateless Widget
The Screen should pass the current value and a callback to change the state. So we have this component for each flavor
Current value to be drawn
Callback to signaling to the screen “the value was changed, we need a recomposition”
This component has a state, so it is a Statefull Widget
This represents the user selection
This is coming from the server. Shaggy, and Scooby, please ask the Pizzeria to add more flavors!
By Moro