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

SwiftUI로 리팩토링 해보기 #19

Merged
merged 13 commits into from
Feb 27, 2024
Merged

SwiftUI로 리팩토링 해보기 #19

merged 13 commits into from
Feb 27, 2024

Conversation

Peter1119
Copy link
Collaborator

MainView를 ExerciseList로 리팩토링해서 호출까지 했습니다 ~!

@Peter1119 Peter1119 self-assigned this Feb 13, 2024
Copy link
Collaborator Author

@Peter1119 Peter1119 left a comment

Choose a reason for hiding this comment

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

여기서부터 봐주시면 됩니다 ! 5692da2

@f-lab-jercy
Copy link
Collaborator

고생하셨습니다.
다만 중간중간 merge커밋이 있는데 왜 있을까요?

@@ -8,11 +8,79 @@
import SwiftUI

struct ExerciseList: View {
@StateObject var viewModel: ExerciseViewModel
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기서 stateobject를 쓰신 이유가 있을까요?
@ stateobject, @ observedObject, @ state @ bind의 차이점이 뭘까요?

Comment on lines +38 to +64
final class MockViewModel: ExerciseViewModel {
init() {
super.init(
useCase: Training(
repository: TrainingRepository(
trainingDataSource: TrainingDataSource())
)
)

self.program = [
TrainingLevel(
id: UUID().uuidString,
name: "Starter",
description: "여긴 해당 설명이 들어갑니다.",
routine: [
DailyRoutine(day: "Day 01", routine: [3,2,1,1]),
DailyRoutine(day: "Day 01", routine: [3,2,1,1]),
DailyRoutine(day: "Day 01", routine: [3,2,1,1]),
DailyRoutine(day: "Day 01", routine: [3,2,1,1]),
DailyRoutine(day: "Day 01", routine: [3,2,1,1])
]
),
TrainingLevel(
id: UUID().uuidString,
name: "Starter",
description: "여긴 해당 설명이 들어갑니다.",
routine: [
Copy link
Collaborator

Choose a reason for hiding this comment

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

mock이 view에 있는게 좋을까요? viewModel에 있는게 좋을까요?

@Peter1119 Peter1119 merged commit 73510d6 into main Feb 27, 2024
1 check passed
@Peter1119 Peter1119 deleted the refactor/swiftUI_View branch February 27, 2024 11:43
Copy link

sonarcloud bot commented Feb 27, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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