collectAsStateWithLifecycle 사용 기준
collectAsStateWithLifecycle을 언제 써야 하는지 정리합니다. Compose에서 StateFlow를 lifecycle-aware하게 수집하는 이유와 ViewModel UI state 설계를 예제로 설명합니다.
collectAsStateWithLifecycle을 언제 써야 하는지 정리합니다. Compose에서 StateFlow를 lifecycle-aware하게 수집하는 이유와 ViewModel UI state 설계를 예제로 설명합니다.
repeatOnLifecycle 없이 Flow를 collect할 때 생길 수 있는 lifecycle, 중복 collect, 화면 비활성 상태 업데이트 문제를 collectAsStateWithLifecycle과 함께 설명합니다.
collectAsStateWithLifecycle이 왜 필요한지, Compose에서 Flow를 화면에 연결할 때 lifecycle을 왜 같이 봐야 하는지 실제 예시와 함께 쉽게 설명합니다.