question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initialising a machine with a different initial state is inert

See original GitHub issue

Currently 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:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MicheleBertolicommented, Feb 25, 2018

Merged #31 🙌 Thank you very much, @ferdinandsalis.

0reactions
ferdinandsaliscommented, Feb 24, 2018

@MicheleBertoli awesome just what I needed ☺️

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found