Hierarchical state machine via the factory design?

Author: AleksVAndCreated Jun 23, 2023Updated Jun 23, 2023

Hey Jake,

Thank you for this project.

I'm trying to create a hierarchical state machine in order to structure the code better and avoid duplication.

So, I have this question - is it possible to combine instantiating a factory with new arbitrary methods? In this way that the new machine has a function which is unique to it.

It seems that currently it doesn't work. Or maybe I'm doing something wrong...

Kind regards

Source: jakesgordon/javascript-state-machine