generated from GSM-MSG/MSG-Repository-Generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🌱 :: [#118] MusicFeature / MusicFeature Scene Seed files
- Loading branch information
Showing
4 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
Projects/Feature/MusicFeature/Sources/Scene/MusicStore.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import BaseFeature | ||
import Combine | ||
import Store | ||
import Moordinator | ||
|
||
final class MusicStore: BaseStore { | ||
var route: PassthroughSubject<RoutePath, Never> = .init() | ||
var subscription: Set<AnyCancellable> = .init() | ||
var initialState: State | ||
var stateSubject: CurrentValueSubject<State, Never> | ||
|
||
init() { | ||
self.initialState = .init() | ||
self.stateSubject = .init(initialState) | ||
} | ||
|
||
struct State {} | ||
enum Action {} | ||
enum Mutation {} | ||
} | ||
|
||
extension MusicStore { | ||
func mutate(state: State, action: Action) -> SideEffect<Mutation, Never> { | ||
.none | ||
} | ||
} | ||
|
||
extension MusicStore { | ||
func reduce(state: State, mutate: Mutation) -> State { | ||
var newState = state | ||
return newState | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
Projects/Feature/MusicFeature/Sources/Scene/MusicViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import BaseFeature | ||
|
||
final class MusicViewController: BaseStoredViewController<MusicStore> { | ||
} |