Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of History API #6

Open
brunoskonrad opened this issue Jan 16, 2018 · 3 comments
Open

Implementation of History API #6

brunoskonrad opened this issue Jan 16, 2018 · 3 comments

Comments

@brunoskonrad
Copy link
Contributor

I was wondering what is the join function used in History code sample:

var nanostate = require('nanostate')

var machine = nanostate('cash', {
  cash: { check: 'check' },
  check: { cash: 'cash' }
})

machine.join('next', nanostate('review', {
  review: { previous: '$history' }
}))

What exactly is next and what it changes in machine object?

@brunoskonrad
Copy link
Contributor Author

Ok, I just watched the talk from David Khourshid about FSM and at https://youtu.be/VU1NKX6Qkxc?t=22m23s he spoke about History states. Is it right to assume that as an answer?

@bcomnes
Copy link

bcomnes commented Jan 17, 2018

I believe the history example here is based on the one in that talk, but yet to be implemented.

@yoshuawuyts
Copy link
Member

@brunoskonrad yep, history states is exactly that. To be fair, this has felt as the most odd part of the API, so suggestions on how to improve it would be very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants