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

πŸš€ 4단계 - μž₯λ°”κ΅¬λ‹ˆ(μˆ˜λŸ‰) #126

Open
wants to merge 4 commits into
base: sana-20
Choose a base branch
from

Conversation

sana-20
Copy link

@sana-20 sana-20 commented Mar 6, 2025

μ•ˆλ…•ν•˜μ„Έμš”! μž₯λ°”κ΅¬λ‹ˆ 4단계 과제 제좜이 λŠ¦μ—ˆλ„€μš”γ… γ…  잘 λΆ€νƒλ“œλ¦½λ‹ˆλ‹€!

Copy link

@BeokBeok BeokBeok 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 +11 to +12
private val _items = mutableStateListOf<CartItem>()
val items: SnapshotStateList<CartItem> get() = _items
Copy link

Choose a reason for hiding this comment

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

StateList와 SnapshotList둜 λ³€κ²½ν•˜μ‹  μ΄μœ κ°€ λ¬΄μ—‡μΈκ°€μš”?

Copy link

Choose a reason for hiding this comment

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

μ €λ²ˆ λ―Έμ…˜μ—μ„œ #122 (comment) μ½”λ§¨νŠΈλ₯Ό μž‘μ„±ν–ˆλŠ”λ° 닡변이 κ°€λŠ₯ν•˜μ‹€κΉŒμš”?

Comment on lines +28 to +37
IconButton(
onClick = onClickRemoveOne,
modifier = Modifier.size(42.dp)
) {
Text(
text = "-",
fontSize = 22.sp,
fontWeight = FontWeight.Bold
)
}
Copy link

Choose a reason for hiding this comment

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

+ λ²„νŠΌκ³Ό - λ²„νŠΌμ€ 곡톡점이 λ§Žμ€ 것 κ°™μŠ΅λ‹ˆλ‹€.
λ°˜λ³΅λ˜λŠ” λ·°λ₯Ό μž¬μ‚¬μš©ν•  수 μžˆλ„λ‘ κ°œμ„ ν•΄λ³΄λ©΄ μ–΄λ–¨κΉŒμš”?

Comment on lines +60 to +64
ProductCount(
count = 2,
onClickAddOne = {},
onClickRemoveOne = {}
)
Copy link

Choose a reason for hiding this comment

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

Previewμ—λŠ” Interactive modeλΌλŠ” κΈ°λŠ₯을 μ œκ³΅ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.
Interactive modeλ₯Ό 톡해 + λ²„νŠΌκ³Ό - λ²„νŠΌμ΄ 잘 λ™μž‘ν•˜λŠ”μ§€ 확인할 수 μžˆλ„λ‘ κ°œμ„ ν•΄λ³΄λ©΄ μ–΄λ–¨κΉŒμš”?

import androidx.compose.ui.unit.sp

@Composable
fun ProductCount(
Copy link

Choose a reason for hiding this comment

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

μž₯λ°”κ΅¬λ‹ˆ ν™”λ©΄μ—μ„œλ„ ProductCountλ₯Ό μ‚¬μš©ν•˜κ³  μžˆλŠ”λ°μš”.
μž₯λ°”κ΅¬λ‹ˆ ν™”λ©΄μ—μ„œ μƒν’ˆμ„ μ œκ±°ν•˜κ²Œ 되면 μƒν’ˆμ˜ 총합이 κ°±μ‹ λ˜μ§€ μ•ŠλŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.
μž₯λ°”κ΅¬λ‹ˆ ν™”λ©΄μ—μ„œ μƒν’ˆμ„ μ œκ±°ν–ˆμ„ 경우 μƒν’ˆμ˜ 총합이 갱신될 수 μžˆλ„λ‘ κ°œμ„ ν•΄λ³΄λ©΄ μ–΄λ–¨κΉŒμš”?

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.

2 participants