Ember Meetup app.
A kinetic puzzle.
The most popular front-end framework for developing responsive, mobile first projects on the web.
A data persistence library for Ember.js.
Ember.js - A JavaScript framework for creating ambitious web applications
A quick prototype to showcase exploratory design decision support
Sample component for cross-operation import experiment
A Vue.js app with web components from other frameworks
Sample VanillaJS component
push eventdavidkpiano/xstate
commit sha 53c932df363e3fee86255d028a4ac7ba7f8fc9e6
Fix Svelte types
commit sha 5f5ef64adaf21ae7d6547ebe78d06aaa76651824
Version Packages (next)
push time in 7 hours
push eventdavidkpiano/xstate
commit sha 53c932df363e3fee86255d028a4ac7ba7f8fc9e6
Fix Svelte types
push time in 7 hours
push eventdavidkpiano/xstate
commit sha 307332adc27531f3890e11845a8a44d4e7d38858
Merge master to next
commit sha 3a2b205d62b22e3a6592241eb71fb96825e68c29
Fix types for Svelte
commit sha 6267e9de26f82dad9f6295ea8bbfdcec076dec21
Version Packages (next)
push time in 7 hours
push eventdavidkpiano/xstate
commit sha 3a2b205d62b22e3a6592241eb71fb96825e68c29
Fix types for Svelte
push time in 7 hours
push eventdavidkpiano/xstate
commit sha 307332adc27531f3890e11845a8a44d4e7d38858
Merge master to next
push time in 7 hours
issue commentdavidkpiano/xstate
Visualizer won't show child machine
@davidkpiano thank you!
comment created time in 9 hours
pull request commentdavidkpiano/xstate
⚠️ No Changeset found
Latest commit: 1306626035b90d496c39f70cbe4cb2f63504f4dd
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
<details><summary>This PR includes no changesets</summary>
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
</details>
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
comment created time in 12 hours
PR opened davidkpiano/xstate
I've created a readme for @xstate/svelte
based on the other integrations. Just a note also to say that there isn't a rollup build step yet so that will need to be added before it can be shipped.
pr created time in 12 hours
issue commentdavidkpiano/xstate
External self transitions require target to re-enter the state node
I would start from adjusting what terms are used there - a targetless transition is not a self transitions, at least not according to this glossary: https://statecharts.github.io/glossary/self-transition.html
comment created time in 14 hours
issue commentdavidkpiano/xstate
External self transitions require target to re-enter the state node
Thanks for clarifying. Like @Andarist mentioned, the docs could maybe be a bit more specific that targetless transitions will lack entry / exit-set (and thus not trigger entry/exit actions etc).
What I felt was a bit confusing was the following:
First it's mentioning "external transitions will exit and reenter the state node in which the transition is defined".
And then in the next section the following are listed:
- EVENT: { actions: [ ... ], internal: false } - external self-transition
- EVENT: { target: undefined, actions: [ ... ], internal: false } - external self-transition, same as above
Which is stating that the above event types are external and per the first definition exit and re-enter the state node which they are defined in.
Is it correct that targetless external self-transitions exit and re-enter their state nodes, but when they do, they do not have any entry / exit-set?
Maybe it's possible to specify that the last two event types are targetless and that targetless external self-transitions will not trigger entry- or exit actions of the parent state node?
comment created time in 14 hours
issue commentdavidkpiano/xstate
External self transitions require target to re-enter the state node
This is working as intended:
The exit set of a transition in configuration C is the set of states that are exited when the transition is taken when the state machine is in C. If the transition does not contain a 'target', its exit set is empty.
The entry set of a transition in configuration C is the set of states that are entered when the transition is taken. If a transition does not contain a 'target', its entry set is empty.
https://www.w3.org/TR/scxml/#SelectingTransitions
That is, regardless of if internal
is specified, if there is no target, the state node will not be exited/reentered.
comment created time in 15 hours
issue commentdavidkpiano/xstate
External self transitions require target to re-enter the state node
The behavior looks correct - take a look at computeExitSet procedure described here: https://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation
Targetless transitions specifically do not exit any states - we could maybe document this better though. Would you be willing to prepare a docs PR that would make this more clear?
comment created time in 15 hours
issue openeddavidkpiano/xstate
External self transitions require target to re-enter the state node
Description <!-- A clear and concise description of what the bug is. --> This is regarding the documentation/functionality w.r.t. external self transitions. I'm not sure if I misinterpreted the docs or if it's a bug.
Expected Result <!-- A clear and concise description of what you expected to happen. --> The documentation at https://xstate.js.org/docs/guides/transitions.html#external-transitions mentions the following:
EVENT: { target: undefined, actions: [ ... ], internal: false } - external self-transition
and
External transitions will exit and reenter the state node in which the transition is defined.
From this I figured something like the following would suffice to re-trigger the entry/exit actions and the invoke on the someState state node when the machine received a SOME_EVENT - event.
{
...
someState: {
entry: 'someEntryAction',
exit: 'someExitAction',
on: {
SOME_EVENT: {
internal: false
}
},
invoke: {
src: someService,
...
}
}
...
}
To get the expected result I had to add an explicit target in the SOME_EVENT transition config.
on: {
SOME_EVENT: {
target: 'someState', // <- Here
internal: false
}
}
Actual Result <!-- A clear and concise description of what happened instead. --> Neither the entry/exit or invoke occured as I was sending SOME_EVENT to the machine.
Reproduction <!-- Create a reproduction of the issue from one of the following templates: -->
- CodeSandbox template (JavaScript)
- CodeSandbox template (TypeScript)
- ⚛︎ CodeSandbox template (React)
- ⚛︎ CodeSandbox template (React + TypeScript)
- 💚 CodeSandbox template (Vue + Composition API)
- XState Visualizer https://codesandbox.io/s/solitary-dream-oo1cw?file=/src/index.ts
Additional context <!-- Add any other context about the problem here (e.g., XState version) -->
created time in 21 hours
issue commentdavidkpiano/xstate
Inconsistent handling of `StateMachine.withContext` and `useMachine` options.context
Yeah, this is currently an inconsistency. In v5, the default behavior will be to merge context, so the behavior will become consistent.
comment created time in a day
issue openeddavidkpiano/xstate
Inconsistent handling of `StateMachine.withContext` and `useMachine` options.context
Description
When the custom initial context is configured with StateMachine.withContext
API, the machine's context is completely replaced with the custom context, as explained in the docs. In contrast, when using the React hook useMachine, context passed in the options object is merged with the machine's context.
Consider:
machine.withContext({ data: 42 }) // overwrites machine's context
// vs.
// (in a React component)
useMachine(machine, { context: { data: 42 } }) // merges data into machine's initial context
Unless I missed some deeper reasoning, this inconsistency is suboptimal.
Expected Result A consistent behavior when extending state machines with context using both APIs is expected.
Actual Result Two different methods of extending machine with a custom context have different behavior.
Reproduction https://codesandbox.io/s/condescending-kowalevski-z48m2
created time in a day
issue commentdavidkpiano/xstate
onTransition does not fire after every transition
If you are referring to what events onTransition
is being called with - this batching only applies to NULL events (aka always transitions) and raised events. If you send an event FOO to a machine and it specifies a regular send
action in a matched transition(s) then this second event won't be "batched" for the purpose of onTransition
.
comment created time in a day
issue commentdavidkpiano/xstate
onTransition does not fire after every transition
Ah, thanks David!
BTW, I assume XState tries to batch actions, even from different states, until it hits a transition it can not cross. (As opposed to taking each state at a time.) Am I correct?
comment created time in 2 days
push eventtensorflow/tfjs-examples
commit sha 298ba06e039a5b07e4c7d57a8ba29c60a7021b8e
[Interactive visualizers] Remove unused line in tslint.json (#392)
push time in 2 days
PR merged tensorflow/tfjs-examples
rxjs, single element in the list, isn't used in the code.
<!-- Reviewable:start -->
This change is <img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/> <!-- Reviewable:end -->
pr closed time in 2 days
PR opened tensorflow/tfjs-examples
rxjs, single element in the list, isn't used in the code.
pr created time in 2 days
issue commentdavidkpiano/xstate
onTransition does not fire after every transition
This will be coming to v5:
// TENTATIVE API
service.onMicrostep(state => {
// intermediate state
console.log(state);
});
comment created time in 2 days
issue commentdavidkpiano/xstate
onTransition does not fire after every transition
I ran into this issue again in my current project where chaining always
seemed to not run sequentially, perhaps due to calling external machines / async functions. So not only it is hard to debug, but I don't know how to sequence 'the XState way'; I'll either have to repeat code & use Promise/await, for force users into human await statements. ;)
Could you elaborate?
I would like to separate each action into a single state, so they can be chained by other states. My quiz program is too complex of an example, so I made a simple one:
This is a dice roller that acclimates sums and clear those sums. I added a shortcut to reset-then-roll in one event. You can see with this shortcut, the reset runs, but is not logged.
https://codesandbox.io/s/xstated6roller-rugv5?file=/src/index.js
comment created time in 2 days
push eventdavidkpiano/xstate
commit sha e0fd12ac43be4508579ccbf1edb3c4d6c544d515
Fixed URL to a codesandbox demoing @xstate/inspect using vanilla JS (#1878) It was pointing to TS template.
commit sha ef9a9542d2460ac71197a178aa28f86a168d5eae
Version Packages
push time in 2 days
push eventdavidkpiano/xstate
commit sha e0fd12ac43be4508579ccbf1edb3c4d6c544d515
Fixed URL to a codesandbox demoing @xstate/inspect using vanilla JS (#1878) It was pointing to TS template.
push time in 2 days
PR merged davidkpiano/xstate
It was pointing to TS template.
pr closed time in 2 days
pull request commentdavidkpiano/xstate
⚠️ No Changeset found
Latest commit: 07ddd800971821ef515b0ada9583db07702f3d8c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
<details><summary>This PR includes no changesets</summary>
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
</details>
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
comment created time in 2 days