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: Mon Oct 21 2024 17:54:39 GMT-0900 (Hawaii-Aleutian Daylight Time)