Skip to content
Permalink
Browse files

Use Never to replace NoAction / NoMutation

  • Loading branch information...
kemchenj committed Apr 13, 2019
1 parent 0d67b8d commit e4ded97745492e9d86e41e0c4144e2778d5067a8
Showing with 6 additions and 3 deletions.
  1. +5 −2 Sources/ReactorKit/Reactor.swift
  2. +1 −1 Tests/ReactorKitTests/ViewTests.swift
@@ -8,8 +8,11 @@
import RxSwift

public struct NoAction {}
public struct NoMutation {}
@available(*, obsoleted: 0, renamed: "Never")
public typealias NoAction = Never

@available(*, obsoleted: 0, renamed: "Never")
public typealias NoMutation = Never

/// A Reactor is an UI-independent layer which manages the state of a view. The foremost role of a
/// reactor is to separate control flow from a view. Every view has its corresponding reactor and
@@ -124,7 +124,7 @@ private final class TestViewController: OSViewController, StoryboardView {
}

private final class TestReactor: Reactor {
typealias Action = NoAction
typealias Action = Never
struct State {}
let initialState = State()
}

0 comments on commit e4ded97

Please sign in to comment.
You can’t perform that action at this time.