Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish interactive vs. non-interactive dispatches and provide cause of non-interactive ones #130

Open
ognen opened this issue Jan 8, 2019 · 0 comments · May be fixed by #134
Open
Assignees
Labels
discussion A discussion issue or PR enhancement

Comments

@ognen
Copy link
Member

ognen commented Jan 8, 2019

interactive metadata on actions

For a variety of reasons (e.g. determining the priority of a dispatch, instrumentation, tracing, etc.) it is important to know whether an action was dispatched as a consequence of a user interaction or not.

Therefore dispatch should add metadata flag (interactive, boolean) to the dispatched action indicating this. Furthermore dispatch should behave slightly differently based on context.

  • the dispatch passed to a UI component should mark the received action as 'interactive' (i.e. a consequence of a user interaction), unless the flag is already set by the code invoking it
  • the dispatch method passed to effects, etc. should mark the action as non-interactive, unless the flag is already set by the caller invoking it

cause metadata on actions

We know that effects can dispatch actions as well. These should get (as metadata) the original action that caused them. This way we would be able to

  • determine the path of actions that led to this action
  • produce good traces of what is/was going on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion A discussion issue or PR enhancement
Projects
None yet
4 participants