Created
July 29, 2021 02:43
-
-
Save ElonPark/99e6c190ec32b99f757bcc1a58bf03d3 to your computer and use it in GitHub Desktop.
ProfileViewReactor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProfileViewReactor: Reactor { | |
// represent user actions | |
enum Action { | |
case refreshFollowingStatus(Int) | |
case follow(Int) | |
} | |
// represent state changes | |
enum Mutation { | |
case setFollowing(Bool) | |
} | |
// represents the current view state | |
struct State { | |
var isFollowing: Bool = false | |
} | |
let initialState: State = State() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment