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

Confusing point on the use-case-statecharts-in-user-interfaces.md page #45

Open
michaellenaghan opened this issue Jan 6, 2020 · 1 comment

Comments

@michaellenaghan
Copy link

The page has this snippet:

green: {
  onEntry: "startHttpRequest",
  onExit: "cancelHttpRequest",
  ...
}

followed shortly thereafter by this snippet:

function transition(event, data) {
  currentState = stateMachine.transition(currentState, event, data);
  field.classList.value = currentState.value;
  currentState.actions.forEach(item => window[item]());
}

There's no explanation of how onEntry and onExit get mapped to actions. (I think I worked it out but it seems like it would be worth spelling it out explicitly for the reader?)

@mogsie
Copy link
Contributor

mogsie commented Jan 18, 2020

Yeah, thanks for this reminder. The page has quite a few TKTK markers so it's not quite finished, and the end does leave the reader hanging. I'll try to find some time to finish this page.

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

No branches or pull requests

2 participants