Create composables using the @Composable annotation
It's quick & easy to create composables
Composables accept parameters
- Use MutableState and remember
- remember the value and not reset when recomposed
- but it wont surive configuration changes
- To remember values from across config changes, use rememberSaveable
// example
val selectedAnswer: Answer? by rememberSaveable { mutableStateOf<Answer>(null)}
Composable should be side-effect free
Execute in any order
Run in parallel
- 병렬적으로 실행
Be skipped
- 값의 변경이 있는 부분만 recompose한다.
Run frequently