Skip to content

Instantly share code, notes, and snippets.

@ElonPark
Created July 29, 2021 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElonPark/99e6c190ec32b99f757bcc1a58bf03d3 to your computer and use it in GitHub Desktop.
Save ElonPark/99e6c190ec32b99f757bcc1a58bf03d3 to your computer and use it in GitHub Desktop.
ProfileViewReactor
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