Created
March 22, 2020 13:57
-
-
Save cipolleschi/13f83f68e37cd677ec12de6493bc84da to your computer and use it in GitHub Desktop.
Dice Roller AppDependencies
This file contains hidden or 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
| import Katana | |
| import Tempura | |
| /// The Container for the dependencies of the App | |
| class AppDependencies: | |
| SideEffectDependencyContainer, | |
| NavigationProvider | |
| { | |
| // The dispatch function that can be used to dispatch | |
| // SideEffects and State Updater | |
| let dispatch: PromisableStoreDispatch | |
| // A closure that returns the most updated version of the state | |
| let getState: GetState | |
| // An object that helps to manage the navigation | |
| let navigator: Navigator | |
| /// Initializer for the AppDependencies | |
| /// - parameter dispatch: the dispatch function that the dependencies must use | |
| /// - parameter getState: the closure that will return the most updated state | |
| required init(dispatch: @escaping PromisableStoreDispatch, getState: @escaping GetState) { | |
| self.dispatch = dispatch | |
| self.getState = getState | |
| self.navigator = Navigator() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment