Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |
Tags
- 쿠링
- ProGuard
- relay
- 백준
- activity
- pandas
- Python
- 코루틴
- MiTweet
- livedata
- Codeforces
- Coroutines
- 프로그래머스
- android
- textfield
- Coroutine
- 암호학
- androidStudio
- Kotlin
- AWS
- Rxjava
- MyVoca
- architecture
- Compose
- 코드포스
- Gradle
- Hilt
- TEST
- boj
- GitHub
Archives
- Today
- Total
목록derivedstateof (1)
이동식 저장소
Compose API 중 ``derivedStateOf``라는 API가 있다. 이름만 보면 state로부터 다른 state를 만드는 함수인 것처럼 보인다. 왜냐면 공식 문서에도 그렇게 적혀있기 때문이다.derivedStateOf: convert one or multiple state objects into another state실제 의미그러나 실제로는 output을 줄이는 최적화 API에 가깝다. Android developers 아티클의 예시를 통해 이해해 보자. 다음과 같은 로그인 UI가 있다. 서비스 정책적으로 username은 알파벳으로만 이루어질 수 있다고 하자. ``username``을 입력할 때 ``submitEnabled``의 변화는 다음과 같다.여기까진 문제가 없다. 그런데 ``user..
Primary/Compose
2024. 7. 16. 14:58