Skip to content
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

[#1012] 간단한 화면에서 MVVM Like 구조 없이 상태관리할 수 있게 구조 변경 #1013

Merged
merged 26 commits into from
Jan 9, 2025

Conversation

l2hyunwoo
Copy link
Member

@l2hyunwoo l2hyunwoo commented Dec 31, 2024

What is this issue?

  • ViewModel을 굳이 사용할 필요가 없는 화면(UiState를 활용해서 추가적인 작업이 필요없는 화면들)들에 대해서 ViewModel을 사용하지 않고 remember와 같은 Compose API로 상태관리할 수 있게 수정
Screen_recording_20250105_123315.mp4

Reference

@l2hyunwoo l2hyunwoo self-assigned this Dec 31, 2024
@l2hyunwoo l2hyunwoo requested a review from a team as a code owner December 31, 2024 05:29
Copy link

height bot commented Dec 31, 2024

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link
Contributor

@giovannijunseokim giovannijunseokim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나머지는 직접 여쭤볼게요 ㅎㅎ

Comment on lines +30 to +38
inline fun <reified T> Context.findActivity(): T? {
var context = this
while (context is ContextWrapper) {
if (context is T) {
return context
}
context = context.baseContext
}
return null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으로 해당 함수에서 null이 반환될 경우 그 이유를 JavaDoc으로 적어주시면 좋을 것 같아요! 해당 함수는 이후 기수분들도 많이 사용할 것 같아서요.

Comment on lines +42 to +47
fun rememberMyPageUiState(
userActiveState: UserActiveState,
authRepository: AuthRepository,
stampRepository: StampRepository,
onRestartApp: () -> Unit
): MyPageUiState {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redux Toolkit -> React Hook

@l2hyunwoo l2hyunwoo merged commit 980c48c into develop Jan 9, 2025
1 check passed
@l2hyunwoo l2hyunwoo deleted the feature/#1012 branch January 9, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor] 간단한 화면들에 대해서 가벼운 상태관리 방식 제안
2 participants