davestewart / javascript-state-machine

An expressive, feature-rich, event-driven JavaScript finite-state machine
http://statemachine.davestewart.io
342 stars 25 forks source link

Update VueRouter helper, set current route as current state #18

Closed eaguad1337 closed 6 years ago

eaguad1337 commented 7 years ago

If you set the helper like this StateHelper.vueRouter(router, helper); in your root component and you refresh the browser you will be redirected to your initial state defined.

With this patch the current route is set to the helper to allow users refresh the page and preserve their state.

davestewart commented 7 years ago

Thanks! Deadlines looming right now, I'll try to look at this next week.

eaguad1337 commented 6 years ago

Hi @davestewart please check it out