Skip to content

Instantly share code, notes, and snippets.

@Laimiux
Last active October 9, 2019 17:41
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 Laimiux/e48a454698c70ff6a4359d12d2b6b49d to your computer and use it in GitHub Desktop.
Save Laimiux/e48a454698c70ff6a4359d12d2b6b49d to your computer and use it in GitHub Desktop.
class StopwatchFormula : Formula<Unit, StopwatchFormula.State, StopwatchRenderModel> {
data class State(
val timePassedInMillis: Long,
val isRunning: Boolean
)
override fun initialState(input: Unit): State = State(
timePassedInMillis = 0,
isRunning = false
)
....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment