Comments (4)
It should be noted that this is from the possible extensions to the formalism chapter, and not part of the original formalism per se. SCXML and most other have them as explicitly hierarchical, so I'm not too keen on this :) "after 2s" is way higher on my list!
Other than that, I haven't experienced the need for it. Yes, there might be portions of a statechart that need to be duplicated (e.g. that α and β arrows need to be duplicated in the C state), I'm thinking that there might be better ways of dealing with that, other than overlapping states. Maybe reusable chunks of on
handlers when defining the state machine itself.
const handleAlpha = { "α", "elsewhere1"}
const handleBeta = { "β": "elsewhere2" };
const states = {
A: {
on: handleAlpha,
states: {
B: {}
C: { on: hanldeBeta}
}
}
D: {
on: handleBeta,
states: {
E: {}
F: {}
C: { on: hanldeAlpha}
}
}
}
The spread operator could be used to combine many signals.
from xstate.
That's true - I'll mark this as Documentation so that we can just show how this can be accomplished with ES6.
from xstate.
I'd still like to support this eventually - although it can be accomplished with ES6 language features, you lose the details of states being related, and that's important meta information to have when visualizing the statecharts.
from xstate.
I can;t find the reference for the paper but this feature had been investigated by Harel and they discarded it because of the added complexity, the perceived lower readability and the lack of actual use cases. aah found it :
One is the notion of overlapping states,
whereby you want the and/or state hierarchy in statecharts
to be a directed graph, not a tree. (...) We found that
the issue was pretty complicated since, e.g., overlapping
can be intermixed not only with the substate facet of the
hierarchy but also with orthogonal components. We
actually concluded that the complications might outweigh
the benefits of implementing the feature.
from xstate.
Related Issues (20)
- Bug: ToProvidedActor issue HOT 1
- Bug: npm version of `@xstate/solid` lists a peer dependency to `[email protected]` causing a peer dependency warning when using xsate v5 HOT 4
- Include `stopChild` in the first argument of the assign function HOT 10
- Bug: Type Declarations in xstate package seem to be erroneous
- Bug: Typescript bug: No Type Error for Non Declared Event HOT 1
- All resolver kinds and implementation types should receive all possible event types outside of transitions HOT 3
- Bug: reenter doesn't work if target not set on transition HOT 1
- Bug: Second argument of sendTo as a plain object causes typescript error HOT 3
- [feature request] finally in machine HOT 1
- Bug: Actor Unions have typing issues related when calling methods HOT 1
- Bug: Child machine provides do not get latest implementation HOT 2
- Bug: error TS2344: Type 'NonNullable<TStateValue[K]>' does not satisfy the constraint 'StateValue' HOT 3
- Bug: Compilation Error when using setup and enqueueActions HOT 1
- Bug: `@xstate/vue` can't be used reliably to create a shared machine across components HOT 5
- Bug: final state with null output is converted to undefined in machine output
- getInitialSnapshot initialize the machine twice
- Bug: emit not available in 5.9.0
- Bug: Parallel states transitions behave differently on V5 HOT 2
- Bug: fromObservable emits undefined as first value HOT 3
- Request (typescript): allow spawn of "unknown" or dynamic actors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xstate.