(reposting from #🌠-general )
i have a machine that runs on an HTTP request.
on each request it either provisions from a state stored, or starts from initial state. it transitions to next state, and stores the state back to the DB.
here is the machine transitions:
request 1:
idle
{ getUserName: 'firstName' }
{ getUserName: 'getFirstName' }
(invokes service)
stored state: https://pastebin.com/DsEJpFhj
request 2:
{ getUserName: 'firstName' }
{ getUserName: 'firstName' }
{ getUserName: 'getFirstName' }
(invokes service)
stored state: https://pastebin.com/0kAywZ8w
machine code: https://codesandbox.io/s/condescending-breeze-49kcts
expected on second request is
{ getUserName: 'lastName' }
{ getUserName: 'getLastName' }
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.