Is it bad practice to call a transition from within an action? / How to change state conditionally? #418
Closed
John-Trager
started this conversation in
General
Replies: 1 comment
-
Hi John, I didn't notice this thread before. Did you figured out how to make it happen? Need some help? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am a bit confused on the correct paradigm that is supposed to be used with the library. Sorry if this is a silly question I just was slightly confused by the documentation.
I am currently creating a class that has a set of actions (with an initial and end state). The initial state makes some computations and has logic to transition to the its next states all the way until it gets to the final state and ends.
an example
As all the state transition are happening in the action is this ok?
From the examples it looked like this was never done and rather transitions happened by calling them on the class object rather than in a class method.
Thanks for your time :)
EDIT:
A follow to this is also how are you supposed to make transitions in state based on some condition?
Beta Was this translation helpful? Give feedback.
All reactions