Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created June 20, 2024 17:12
Show Gist options
  • Save elijahbenizzy/c295c2578685867996577733b8005f59 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/c295c2578685867996577733b8005f59 to your computer and use it in GitHub Desktop.
@action(reads=["count"], writes=["count"])
def counter(state: State) -> State:
return state.update(counter=state.get("count", 0) +1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment