State machine with adonis?


#1

how to implement state machine?


#3

The topic has been flagged and unlisted. Make sure to create proper questions with enough context and steps you have taken so far.

Widely open questions are likely to get less replies


#5

I think for you should explain us what’s the purpose of javascript-state-machine.

If it’s packages like lodash that doesn’t need any config.

You can just use it as follows:

var StateMachine = require('javascript-state-machine');

if it needs configuration, you can check:

https://adonisjs.com/docs/4.1/service-providers

Especially

https://adonisjs.com/docs/4.1/service-providers#_npm_package_as_a_service_provider


#6

State machine is good to build an ecommerce.Look at this: https://docs.sylius.com/en/1.2/book/architecture/state_machine.html
https://guides.spreecommerce.org/developer/checkout.html#adding-logic-before-or-after-a-particular-step


#7

Topic has been closed, since the author of the topic is only interested in sharing links and expecting others to read and write code for him