Support instantiation without an 'initial' property. Allow it to be set later.
mjstahl opened this issue · comments
Mark Stahl commented
const state = new Stated({
hello: {
value: 'hello',
TOGGLE: 'goodbye'
},
goodbye: {
value: 'goodbye',
TOGGLE: 'hello'
}
})
state.state //-> undefined
state.initial = 'hello'
state.state //-> 'hello'