ScreenDataNavigation

1.2.0

Handling ScreenData's Destinations
ServerDriven/ScreenDataNavigation-swift

What's New

1.2.0

2022-05-07T21:55:42Z

Full Changelog: 1.1.0...1.2.0

ScreenDataNavigation

// MARK: ScreenProviding
// Provide ScreenDataUI with SomeScreen

public protocol ScreenProviding {
    func screen(forID id: String) -> AnyPublisher<SomeScreen, Error>
}

public struct MockScreenProvider: ScreenProviding {
    // ...
}

public struct URLScreenProvider: ScreenProviding {
    // ...
}

public struct FileScreenProvider: ScreenProviding {
    // ...
}

// MARK: ScreenStoring
// Store SomeScreens for later

public protocol ScreenStoring {
    func store(screens: [SomeScreen]) -> AnyPublisher<Void, Error>
}

public struct FileScreenStore: ScreenStoring {
    // ...
}

// MARK: ScreenLoading
public protocol ScreenLoading {
    func load(withProvider provider: ScreenProviding) -> AnyPublisher<[SomeScreen], Error>
}

// MARK: ScreenLoading Basic Implementation
extension SomeScreen: ScreenLoading {
    // ...
}

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

Last updated: Sat Oct 19 2024 21:12:49 GMT-0900 (Hawaii-Aleutian Daylight Time)