-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX/#220] Group / state 변경 #224
Conversation
- core:model의 모델을 state로 사용 -> 화면 전용 immutable 모델 선언 및 state 사용
- core:model의 모델을 state로 사용 -> 화면 전용 immutable 모델 선언 및 state 사용 - uiState 선언시 등호 대신 by 사용하여 State 내부 타입 바로 접근
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Immutable 한 UI Model 을 선언함으로서 컴포즈에서의 안정성을 챙기는 과정인거죠? 좋습니다!
@Immutable | ||
data class GroupUiModel( | ||
val id: String, | ||
val adminUser: String, | ||
val createdAt: Date, | ||
val description: String, | ||
val imageUrl: String, | ||
val name: String, | ||
val members: ImmutableList<String>, | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GroupUiModel에 꼭 Immutable을 붙여야 하는 이유가 Date 때문인가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 Immutable을 선언해도 해도 Date 객체가 java.util 에서 제공하는 거라 객체는 unstable이겠네요.
java.util 의 Date 대신 kotlinx 에서 제공하는 LocalDate 타입 쓰면 immutable 타입으로 사용 가능하다 하는데 이거로 대체하기에는 시간이 없네요 ㅠㅠ
📍 Work Description
📢 To Reviewers
⏲️Time