Skip to content


getData() for only that state #48

ghost opened this Issue · 2 comments

1 participant


There are times I need to check if there is data stored for only the current state.

That is I don't care if the parent states hold the data with the same name.

Would it make sense to have something like

this.getData('view', false)

to only check for "view" in the current state and not propagate to the parent states if nothing is found?


Interesting idea. Kind of breaks the deterministics of a statechart because you are asking the current state of the statechart hierarchy if it has a value and short circuiting it.

I'll have to think about it...


I find some properties are state specific not statechart specific.

Eg. instead of me having to return a closure for wrapping around a variable for only that state it would be simpler to just set the data in that state and know i can retrieve it if it's there and not one from the parent if it's not there.

@etgryphon etgryphon closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.