mjstahl / stated

Simply put state management for your JavaScript application
https://www.npmjs.com/package/@mjstahl/stated
MIT License
4 stars 0 forks source link

'initial' should not be a state, it should be a path to an existing state #4

Closed mjstahl closed 5 years ago

mjstahl commented 5 years ago
const h20 = stated({
  initial: 'water', 
  water: {
    FROZEN: 'ice',
    BOILED: 'steam',
    value: '60F'
  },
  ice: {
    BOILED: 'steam',
    WARMED: 'initial',
    value: '32F'
  },
  steam: {
    COOLED: 'initial',
    FROZEN: 'ice',
    value: {
      temp: '212F'
    }
  }
})