Skip to content

Effects and Events should be immutable #1

Description

@pettermahlen

Currently, the AttemptToPlay Effect and PlayButtonClicked contain a Context reference. There are a couple of problems with this:

  • Context is mutable, meaning so are the effects and events.
  • The Context isn't event- or effect-specific, meaning it's just being passed through the update.

A better solution is to make it a member field in the effect handler (effect handlers are intended to be a place for mutable state).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions