Skip to content

Conversation

@tunaunnie
Copy link
Contributor

Related issue ๐Ÿ› 

Work Description โœ๏ธ

  • Clean Architecture ์ ์šฉ
    • Data: datalocal, dataremote ๋ถ„๋ฆฌํ•˜๊ณ  ๊ฐ๊ฐ impl ๊ตฌํ˜„
    • UserRepository ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์„ฑ ๋ฐ usecase ์—ฐ๊ฒฐ

Screenshot ๐Ÿ“ธ

  • week4์™€ ๋™์ผ

Uncompleted Tasks ๐Ÿ˜…

  • Task1

To Reviewers ๐Ÿ“ข

  • ํ”„๋กœ์ ํŠธ์— ์ „์ฒด์ ์ธ ์•„ํ‚คํ…์ฒ˜๋ฅผ ์ ์šฉํ•˜๋Š” ์ผ์ด ๋งŽ์ด ์–ด๋ ค์›Œ์„œ ์›Œํฌ๋ถ ๋‚ด ๋ฐ์ดํŠธ๋กœ๋“œ ์†Œ์Šค์ฝ”๋“œ์™€ ๋ฏผ์„๋‹˜ ์ฝ”๋“œ๋ฅผ ์ •๋ง ๋งŽ์ด ์ฐธ๊ณ ํ–ˆ์Šต๋‹ˆ๋‹ค.. ํŠนํžˆ ์˜์กด์„ฑ ์ฃผ์ž… (di) ๋ถ€๋ถ„์€ ์ดํ•ดํ•˜๊ธฐ๊ฐ€ ์–ด๋ ค์›Œ์„œ ๊ณ„์† ์ฝ”๋“œ๋ฅผ ์ฐธ๊ณ ํ•˜๋‹ค ๋ณด๋‹ˆ ๊ฑฐ์˜ ๊ตฌ์กฐ๋ฅผ ๋˜‘๊ฐ™์ด ๋งŒ๋“  ๊ฒƒ ๊ฐ™์•„์š”๐Ÿ˜ญ Usecase์™€ Repository ๊ตฌํ˜„์ฒด๋ฅผ ๋ถ„๋ฆฌํ•ด์„œ ์˜์กด์„ฑ์„ ์ตœ๋Œ€ํ•œ ์ œ๊ฑฐํ•œ๋‹ค๋Š” ์•„์ด๋””์–ด๋Š” ์–ด๋А ์ •๋„ ๊ฐ์ด ์žกํžŒ ๊ฒƒ ๊ฐ™์€๋ฐ, ์•„์ง Hilt์— ๋Œ€ํ•œ ์ดํ•ด๋Š” ๋งŽ์ด ๋ถ€์กฑํ•œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹คใ…œใ…œ

@tunaunnie
Copy link
Contributor Author

์ด์ „ ์ฃผ์ฐจ (week4) ๊ณผ์ œ๊นŒ์ง€ ์ด๋ฒˆ์— ํ•œ ๋ฒˆ์— ์ง„ํ–‰ํ•ด์„œ ๋จธ์ง€๊ฐ€ ์•ˆ ๋œ ์ƒํƒœ๋ผ ์ด๋ฒˆ์—๋„ ํŒŒ์ผ ํŠธ๋ž˜ํ‚น์ด ๋‹ค ์„ž์—ฌ๋ฒ„๋ ค์„œ ์ฝ”๋“œ ๋ฆฌ๋ทฐ ์ง„ํ–‰ํ•˜์‹œ๊ธฐ๊ฐ€ ์–ด๋ ค์šฐ์‹ค ๊ฒƒ ๊ฐ™์•„์š”..ใ… ใ…  ๋Œ€๋žต์ ์œผ๋กœ data ํŒจํ‚ค์ง€์˜ datalocal, dataremote, di ํŒจํ‚ค์ง€, domain/repository ํŒจํ‚ค์ง€์˜ UserRepository, usecase ํŒจํ‚ค์ง€ ํ•˜์˜ ํŒŒ์ผ๋“ค ํ™•์ธํ•ด์ฃผ์‹œ๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค..!

Copy link

@chattymin chattymin left a comment

Choose a reason for hiding this comment

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

6์ฃผ์ฐจ ๊ณผ์ œ ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค!!
clean architecture์— ๋Œ€ํ•ด์„œ ํ•œ๋ฒˆ ๋” ๊ณต๋ถ€ํ•ด๋ณด์‹œ๊ณ  ๋ฆฌํŽ™ํ† ๋ง ์ง„ํ–‰ํ•ด๋ณด์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”!

์ƒˆ๋กœ์šด ๊ธฐ์ˆ ์„ ๋ฐฐ์›Œ์„œ ์“ฐ๋Š” ๊ฒƒ๋„ ์ข‹์ง€๋งŒ, ๊ธฐ์กด์˜ ๊ธฐ์ˆ ์„ ์ž˜ ์•Œ๊ณ  ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ์ •๋ง์ •๋ง ์ค‘์š”ํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•ด์š”. ์•ฑ์žผ์ด ๋‹ค๊ฐ€์˜ค๊ณ  ์žˆ๋Š”๋ฐ ์•ฑ์žผ ์ „์— ์ง€๊ธˆ๊นŒ์ง€ ๋ฐฐ์šด ๊ฒƒ๋“ค์„ ํ•œ๋ฒˆ ๋ณต์Šตํ•˜๋Š” ์‹œ๊ฐ„์„ ๊ฐ€์ ธ๋ณธ๋‹ค๋ฉด ์•ฑ์žผ๋•Œ ์ •๋ง ํฐ ๋„์›€์ด ๋ ๊ฑฐ์—์š” :)

Comment on lines +3 to +8
import org.sopt.and.data.dataremote.model.request.RequestCreateUserDto
import org.sopt.and.data.dataremote.model.request.RequestGetUserDto
import org.sopt.and.data.dataremote.model.response.ResponseCreateUserSuccessDto
import org.sopt.and.data.dataremote.model.response.ResponseGetUserDto
import org.sopt.and.data.dataremote.model.response.ResponseGetUserHobbyDto
import retrofit2.Response

Choose a reason for hiding this comment

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

domain์ธ๋ฐ data layer์— ์˜์กด์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์š”.
๊ทธ๋ฆฌ๊ณ  retrofit์— ๋Œ€ํ•œ ์˜์กด์„ฑ๋„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์š”.

domain๋ชจ๋“ˆ์€ kotlin/java์— ๋Œ€ํ•œ ์˜์กด์„ฑ๋งŒ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์˜์กด์„ฑ ์ œ๊ฑฐ๋ฐ”๋ž๋‹ˆ๋‹ค!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

์˜์กด์„ฑ ๋ถ„๋ฆฌ๋ผ๋Š” ์›๋ž˜ ๋ชฉ์ ์„ ์ƒ๊ฐํ•˜๋ฉด์„œ ๋ฆฌํŒฉํ† ๋งํ•ด๋ณด๋‹ˆ, ํด๋ฆฐ ์•„ํ‚คํ…์ฒ˜๊ฐ€ ์ง€ํ–ฅํ•˜๋Š” ๊ตฌ์กฐ์— ๋Œ€ํ•ด์„œ ์กฐ๊ธˆ ๋” ๊ฐ์ด ์žกํžˆ๋Š” ๊ฒƒ ๊ฐ™์•„์š”. ๋ฆฌ๋ทฐ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!!

Copy link
Member

@t1nm1ksun t1nm1ksun left a comment

Choose a reason for hiding this comment

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

6,7์ฃผ์ฐจ ๋‚ด์šฉ ์ €๋Š” ์ƒ๋‹นํžˆ ์–ด๋ ต๋˜๋ฐ ๊ณ ์ƒ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!
์ด์ œ ๊ณง ์•ฑ์žผํ•˜์‹ค ํ…๋ฐ ํ™”์ดํŒ…์ž…๋‹ˆ๋‹ค!!

Comment on lines 43 to 46
data class LoginScreen(
val emailText: String,
val userNameText: String,
val passwordText: String
)
Copy link
Member

Choose a reason for hiding this comment

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

์•„๋ž˜์— ์žˆ๋Š” ๋กœ๊ทธ์ธํ™”๋ฉด๊ณผ ๋„ค์ด๋ฐ์ด ๋˜‘๊ฐ™์•„์„œ ํ—ท๊ฐˆ๋ฆด ์ˆ˜ ์žˆ์„๊ฑฐ๊ฐ™์•„์š”!
๊ทธ๋ฆฌ๊ณ  ๋งŒ์•ฝ ์‚ฌ์šฉํ•˜๋Š”๊ณณ์ด๋‚˜ ๋‹ค๋ฅธ data class๋“ค์ด ๋งŽ์•„์ง„๋‹ค๋ฉด ๋”ฐ๋กœ ํด๋”๋ฅผ ์ƒ์„ฑํ•ด์„œ ๊ด€๋ฆฌํ•˜๋Š”๊ฒƒ๋„ ์ข‹์Šต๋‹ˆ๋‹ค!

) : ViewModel() {

//๋กœ๊ทธ์ธ ์š”์ฒญ์„ ์„œ๋ฒ„๋กœ ๋ณด๋‚ด๊ธฐ ์œ„ํ•จ
private val userService by lazy { ServicePool.userService }
Copy link
Member

Choose a reason for hiding this comment

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

UseCase๋ฅผ ํ†ตํ•ด ์„œ๋ฒ„ํ†ต์‹ ์„ ๋งŒ๋“ค์–ด ๋‘์—ˆ์œผ๋‹ˆ ์ด์ œ ํ•ด๋‹น ์ฝ”๋“œ๋Š” ์‚ฌ์šฉ๋˜์ง€ ์•Š์„ ๊ฒƒ ๊ฐ™์•„์š”!

Comment on lines +34 to 48
fun StringInputValidCheck(newString: String): Boolean {
var isValid = false
val inputStr : CharSequence = email
val pattern = Patterns.EMAIL_ADDRESS
val matcher = pattern.matcher(inputStr)
if(matcher.matches()){
isValid = true
val inputStr : CharSequence = newString

if(inputStr.length >= 8){
return isValid
} else {
return !isValid
}
return isValid
}

fun PasswordValidCheck(password: String): Boolean {
val pattern = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)|(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#\$%^&*])|(?=.*[a-z])(?=.*\\d)(?=.*[!@#\$%^&*])|(?=.*[A-Z])(?=.*\\d)(?=.*[!@#\$%^&*]).{8,20}\$".toRegex()
val pattern = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)|(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#\$%^&*])|(?=.*[a-z])(?=.*\\d)(?=.*[!@#\$%^&*])|(?=.*[A-Z])(?=.*\\d)(?=.*[!@#\$%^&*]).{1,8}\$".toRegex()
return password.matches(pattern)

}
Copy link
Member

Choose a reason for hiding this comment

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

ํ•ด๋‹น ๋กœ์ง๋“ค์€ ๋น„์ง€๋‹ˆ์Šค ๋กœ์ง์ด๋ผ๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค!
์–ด๋””์— ์œ„์น˜ํ•˜๋ฉด ์ข‹์„๊นŒ์š”?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

validateUserInputUseCase์— ์œ ํšจ์„ฑ ๊ฒ€์ฆ ๋กœ์ง์„ ์˜ฎ๊ฒจ์„œ domain ๋ ˆ์ด์–ด๋กœ ๋ถ„๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค!! ๊ผผ๊ผผํ•œ ๋ฆฌ๋ทฐ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ๐Ÿฅฒ

) : ViewModel() {

//๋กœ๊ทธ์ธ ์š”์ฒญ์„ ์„œ๋ฒ„๋กœ ๋ณด๋‚ด๊ธฐ ์œ„ํ•จ
private val userService by lazy { ServicePool.userService }
Copy link
Member

Choose a reason for hiding this comment

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

DI๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๋ฐ ServicePool์„ ์ง์ ‘ ์ฐธ์กฐํ•˜๋Š” ๊ฒƒ์€ DI ์›์น™์— ์œ„๋ฐฐ๋ฉ๋‹ˆ๋‹ค!
๋ฏผ์„์ด ์ฝ”๋ฉ˜ํŠธ ์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ์ฝ”๋“œ๋‹ˆ ์ œ๊ฑฐ ํ•ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š”

Comment on lines 36 to 37
private val _loginResult = MutableStateFlow<Boolean?>(null)
val loginResult = _loginResult.asStateFlow()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
private val _loginResult = MutableStateFlow<Boolean?>(null)
val loginResult = _loginResult.asStateFlow()
sealed class LoginUiState {
object Initial : LoginUiState()
object Success : LoginUiState()
data class Error(val message: String) : LoginUiState()
}
private val _loginState = MutableStateFlow<LoginUiState>(LoginUiState.Initial)
val loginState = _loginState.asStateFlow()

Boolean? ๋Œ€์‹  sealed class๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ƒํƒœ๋ฅผ ๋” ๋ช…ํ™•ํ•˜๊ฒŒ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์–ด์š”!

_shouldShowPassword.value = !_shouldShowPassword.value
}

// ์ž…๋ ฅ๊ฐ’์ด ์กฐ๊ฑด์— ๋งž๋Š”์ง€ ํ™•์ธ (๋‘˜ ๋‹ค ์—ฌ๋Ÿ ์ž ์ดํ•˜?)
Copy link
Member

Choose a reason for hiding this comment

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

์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๋กœ์ง์„ ๋ณ„๋„์˜ UseCase๋‚˜ ๋‹ค๋ฅธ ํด๋ž˜์Šค๋กœ ๋ถ„๋ฆฌํ•˜๋Š”๊ฒŒ ์ข‹์•„๋ณด์—ฌ์š”

Comment on lines +36 to +38
_user.value.name = userName
_user.value.hobby = hobby
_user.value.accessToken = accessToken
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
_user.value.name = userName
_user.value.hobby = hobby
_user.value.accessToken = accessToken
_user.value = _user.value.copy(
name = userName,
hobby = hobby,
accessToken = accessToken
)

์ง์ ‘ ํ•„๋“œ ์ˆ˜์ •์€ ๊ถŒ์žฅ๋˜์ง€ ์•Š๋Š”๊ฑธ๋กœ ์•Œ์•„์„œ ์š”๋ ‡๊ฒŒ ํ•ด๋ณด๋Š”๊ฑด ์–ด๋•Œ์š”?

private val postSignUpUseCase: PostSignUpUseCase
) : ViewModel() {

private val userService by lazy { ServicePool.userService }
Copy link
Member

Choose a reason for hiding this comment

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

ServicePool์„ ํ†ตํ•ด UserService๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ๋Œ€์‹ , ์ƒ์„ฑ์ž๋ฅผ ํ†ตํ•œ ์˜์กด์„ฑ ์ฃผ์ž…์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค

private val userService by lazy { ServicePool.userService }
โ†“
@Inject constructor(
private val userService: UserService,
private val postSignUpUseCase: PostSignUpUseCase
)

return _isUserNameValid.value && _isPasswordValid.value
}

suspend fun createNewUser() {
Copy link
Member

Choose a reason for hiding this comment

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

createNewUser() ํ•จ์ˆ˜๊ฐ€ ๋„ˆ๋ฌด ๋งŽ์€ ์ผ์„ ํ•˜๊ณ  ์žˆ๋Š”๊ฒƒ ๊ฐ™์•„์š”. ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๋กœ์ง์„ ๋ณ„๋„์˜ private ํ•จ์ˆ˜๋กœ ๋ถ„๋ฆฌํ•˜๋ฉด ์ฝ”๋“œ ๊ฐ€๋…์„ฑ์ด ๋” ์ข‹์•„์งˆ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ๋ณด๋‹ค ํ›จ์”ฌ ๊น”๋”ํ•ด์งˆ ๊ฑฐ์˜ˆ์š”!

Copy link
Member

@angryPodo angryPodo left a comment

Choose a reason for hiding this comment

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

์ง€์›์•„ ๊ณ ์ƒ ๋งŽ์•˜๋‹คใ… 
์ฝ”ํ‹€๋ฆฐ๋„ ์•ˆ ์ต์ˆ™ํ•œ๋ฐ ์ด ์ •๋„๋กœ ์ ์šฉํ•œ ๊ฑฐ ๋ณด๋ฉด ์ง„์งœ ๋Œ€๊ฒฌํ•˜๋‹ค! ์•„ํ‚คํ…์ฒ˜ ํŒจํ„ด์ด๋ž‘ ๋กœ์ง ๋ถ„๋ฆฌ๋Š” ๋‚˜๋„ ์•„์ง๋„ ๊ฐ์ด ์ž˜ ์•ˆ ์˜ค๋Š” ๋ถ€๋ถ„์ด๋ผ... ์•ฑ์žผ ํ•˜๋ฉด์„œ ์‹ค์ „์œผ๋กœ ๋ถ€๋”ชํ˜€๋ณด๋ฉด ์™œ ์จ์•ผ ํ•˜๋Š”์ง€ ๋” ์™€๋‹ฟ์„ ๊ฑฐ๊ณ , ๊ทธ ๋‹ค์Œ๋ถ€ํ„ฐ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ๋ฐœ์ „์‹œ์ผœ๋‚˜๊ฐˆ ์ˆ˜ ์žˆ์„ ๊ฑฐ์•ผ.๋งˆ์ง€๋ง‰๊นŒ์ง€ ํž˜๋‚ด๋ณด์ž!

Copy link
Contributor

@jihyunniiii jihyunniiii 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 +3 to +4
import org.sopt.and.data.dataremote.model.response.ResponseGetUserHobbyDto
import org.sopt.and.domain.repository.UserRepository
Copy link
Contributor

Choose a reason for hiding this comment

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

domain ๋ ˆ์ด์–ด์ธ๋ฐ data์— ๋Œ€ํ•œ ์˜์กด์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์š”.
์„ธ๋ฏธ๋‚˜ ๋•Œ ๋ฐฐ์šด ์˜์กด์„ฑ์„ ๋ฐ”ํƒ•์œผ๋กœ ์–ด๋–ป๊ฒŒ ์ˆ˜์ •ํ•˜๋ฉด ์ข‹์„์ง€ ๊ณ ๋ฏผํ•ด๋ด…์‹œ๋‹ค.


import org.sopt.and.data.dataremote.model.response.ResponseGetUserHobbyDto
import org.sopt.and.domain.repository.UserRepository
import retrofit2.Response
Copy link
Contributor

Choose a reason for hiding this comment

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

๋งˆ์ฐฌ๊ฐ€์ง€๋กœ domain ๋ ˆ์ด์–ด๋Š” ์ˆœ์ˆ˜ํ•œ java, kotlin ์ฝ”๋“œ๋กœ ์ด๋ฃจ์–ด์ ธ์•ผ ํ•ฉ๋‹ˆ๋‹ค.


var emailState = remember { mutableStateOf(inputEmail) }
var passwordState = remember { mutableStateOf(inputPassword) }
var isUserNameValid = loginViewModel.isUserNameValid.collectAsState().value
Copy link
Contributor

Choose a reason for hiding this comment

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

collectAsState์™€ collectAsStateWithLifecycle์˜ ์ฐจ์ด๋Š” ๋ฌด์—‡์ผ๊นŒ์š”?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

collectAsStateWithLifecycle์€ ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์ƒํƒœ์ฒ˜๋Ÿผ ํ™”๋ฉด์ด ํ™œ์„ฑํ™”๋˜์ง€ ์•Š์•˜์„ ๋•Œ๋Š” ๊ตณ์ด State๋ฅผ ๊ณ„์† ๊ด€์ฐฐํ•˜๊ณ  ์žˆ์ง€ ์•Š์•„์„œ ์กฐ๊ธˆ ๋” ํšจ์œจ์ ์œผ๋กœ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์œผ๋กœ ์•Œ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค!

๋งค๋ฒˆ collectAsStateWithLifecycle์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ๋ฌด์กฐ๊ฑด ์ข‹์ง€๋งŒ์€ ์•Š์„ ๊ฒƒ ๊ฐ™์•„์„œ, ๊ตฌ๋…ํ•˜๊ณ  ์žˆ๋Š” StateFlow๊ฐ€ ์–ผ๋งˆ๋‚˜ ์ž์ฃผ ๋ณ€๊ฒฝ๋˜๋Š” ๊ฐ’์ธ์ง€? ๋“ฑ์„ ๊ณ ๋ คํ•ด์„œ ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•์„ ์ตํžˆ๋Š” ๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค

Comment on lines +10 to +11
import org.sopt.and.data.datalocal.datasource.UserInfoLocalDataSource
import org.sopt.and.data.dataremote.network.ServicePool
Copy link
Contributor

Choose a reason for hiding this comment

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

์—ฌ๊ธฐ๋„ ์˜์กด์„ฑ ๋‹ค์‹œ ํ•œ ๋ฒˆ ๊ณ ๋ฏผํ•ด๋ด…์‹œ๋‹ค.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

๋ฆฌ๋ทฐ ๋ฐ˜์˜ํ•ด์„œ ์˜์กด์„ฑ์— ๋Œ€ํ•ด ๊ณ ๋ฏผํ•ด๋ณด๊ณ  ๋ชจ๋“  Viewmodel์—์„œ data ๋ ˆ์ด์–ด ๊ด€๋ จ ์˜์กด์„ฑ ์ œ๊ฑฐํ–ˆ์Šต๋‹ˆ๋‹ค! (UseCase -> UserRepositoryImpl์œผ๋กœ ๋ถ„๋ฆฌ)

navController.navigate(Route.SearchScreen)
}
"profile" -> {
navController.navigate(Route.MypageScreen(userName = "")) /*username์„ ์—ฌ๊ธฐ๋‹ค ์–ด๋–ป๊ฒŒ ๋„ฃ์–ด์ฃผ์ง€?*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Route sealed class๋ฅผ ์–ด๋–ป๊ฒŒ ํ™œ์šฉํ•˜๋ฉด ๊ฐ’์„ ๋„ฃ์–ด์ค„ ์ˆ˜ ์žˆ์„์ง€ ์ƒ๊ฐํ•ด๋ณด์„ธ์š”!

Copy link
Contributor

Choose a reason for hiding this comment

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

์„ธ๋ฏธ๋‚˜ ์ž๋ฃŒ ์ฐธ๊ณ ํ•ด๋ณด์…”์š”!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Week6

6 participants