Initialising a machine with a different initial state is inert
See original GitHub issueCurrently when you want to initialise a Machine with a different state than specified in the statechart the resulting state is inert and might lack necessary information to be useful to render an ui. That is actions and history (maybe more in the future eg. data).
Might it be better to able to pass a state object such as from new State(stateValue, history?, actions?) to the withStatechart decorated component?
My use case is as stated in this issue https://github.com/davidkpiano/xstate/issues/31.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How does the initialization of the value function and definition ...
As far as I see, in the first case, the algorithm will easily quickly converge as the reward is very high for the...
Read more >Initializing neural networks - DeepLearning.AI
In this post, we'll explain how to initialize neural network parameters effectively. Initialization can have a significant impact on convergence in training ...
Read more >How to initialize all members of an array to the same value?
For statically initializing a large array with the same value, without multiple copy-paste, you can use macros: #define VAL_1X 42 #define VAL_2X VAL_1X, ......
Read more >Initialization and Cleanup: Chapter 4 of Objects and Java
If you design your classes such that initializers and constructors always produce a valid state for newly-created objects, there will be no way...
Read more >Initialization — The Swift Programming Language (Swift 5.7)
The default initializer simply creates a new instance with all of its ... fully initialized once the initial state of all of its...
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 Free
Top 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

Merged #31 🙌 Thank you very much, @ferdinandsalis.
@MicheleBertoli awesome just what I needed ☺️