Skip to content

Instantly share code, notes, and snippets.

@hlung
Last active May 8, 2019 04:10
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 hlung/65b5cdcc2a758d1e3ad605007f5fc0bc to your computer and use it in GitHub Desktop.
Save hlung/65b5cdcc2a758d1e3ad605007f5fc0bc to your computer and use it in GitHub Desktop.
/// Represents a user action which reacts to something
struct Reaction {
let type: ReactionType
let target: ReactionTarget
var isOn: Bool
}
enum ReactionType: String, Decodable {
case heart
case unsupported
}
enum ReactionTarget: Equatable {
case post(id: String)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment