Skip to content

Conversation

@timshadel
Copy link
Member

The intent is to make it easy to issue several back-to-back commands that implicitly depend on each other before they can run. GetLocation and GetWeather are an example. You need to know the location before you can request the weather. By issuing them both at the same time, your location command can see that the existing location is recent enough, and choose to do nothing in it's execute(state:, core:) function, and the weather command will still run properly since it will find location in the proper place in state.

  • Existing commands will be unaffected. Defaults always assume commands will run.
  • Any command that implements canExecute(state:) will default to expiring in 10 seconds.
  • Commands may never run if you stop sending events to core, but if that happens your app is lifeless, so in practice this shouldn't be a problem...I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant