[question] how to get additional empty variable inside state
See original GitHub issueHi, thank you for your work and your good choice: mealy-machine!
I’ve a little question, I’ve create new Machine thats work inside Vue.js!
Now I want to get additional parameter parentAction = new
inside the state.
var stent = Machine.create('actions', {
state: { name: 'start', parentAction: 'new' },
transitions: {
'start': {
'take note': 'note',
'create ordine': 'order',
'take party': 'party'
},
'note': {
'take another note': 'note',
'create order': 'order',
'take party': 'party'
},
'party': {
'add participant': { name: 'participant', parentAction: 'new' }
},
'participant': {
'create ordine'': 'order',
'add participant': 'participant',
},
...
The first state start
has stent.state.parentAction = 'new'
, correct,
but when I change the state to note
the stent.state.parentAction
is always new
.
There is a way to get undefined, null, empty
variable for states that haven’t stent.state.parentAction
defined?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Initializing empty state that will receive a number in React
My question is to confirm whether or not that's the only option. If it were an array, we'd start with an empty array;...
Read more >how to write empty variable.... - MATLAB Answers - MathWorks
while doing a calculation if i get a variable named "varName" with empty value i wanted to display a message "Dont not Exist".........
Read more >Setting variables (and doing other things) with questions
So far, we have discussed questions that set a single multiple-choice variable and the use of continue button field to set a single...
Read more >How to Define Empty Variables and Data Structures in Python
This explainer shows how to create empty variables with None and Nan in Python, as well as how to use empty data structures...
Read more >var - JavaScript - MDN Web Docs - Mozilla
In the global context, a variable declared using var is added as a non-configurable property of the global object. This means its property ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, to simplify and help you, here’s my issue simulated without vuejs: https://runkit.com/menteora/stent-issue14
No worries. Let me know if something else is not working as expected.