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: Thu Sep 01 2022 07:41:27 GMT-0500 (GMT-05:00)