Reactor

master

The most advanced state management framework for SwiftUI.
vmanot/Reactor

Reactor

A state management framework for SwiftUI.

public struct ExampleView: ReactorView {
    public let reactor: Reactor
    
    public init(reactor: Reactor) {
        self.reactor = reactor
    }
    
    public func makeBody(reactor: Reactor) -> some View {
        Text("Hello world!")
    }
}

extension ExampleView {
    public struct Reactor: ViewReactor {
        public enum Action: ReactorAction {
            
        }
        
        @ViewReactorEnvironment() public var environment
    }
}

extension ExampleView.Reactor {
    public func task(for action: Action) -> ActionTask {
        
    }
}

Description

  • Swift Tools
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Nov 09 2022 00:11:28 GMT-0500 (GMT-05:00)