Integration for Vue
vue package helps us to integrate AgileTs into a Vue environment
and serves as an Interface to Vue.
Its main task is to bind States to Vue Components.
This binding ensures that AgileTs rerender the Component whenever a bound State mutates.
It also offers some other valuable functionalities that optimize the workflow using AgileTs in a Vue project.
bindAgileInstances() method binds/subscribes States to Vue Components.
This binding ensures that the Component rerenders whenever a bound State mutates.
We can flexibly bind any State to any Vue Component.
bindAgileInstances() returns a State value keymap based on the passed States.
We merge the returned keymap into the
to access the State
values in the
html code like we would local Vue States.
Note that the AgileTs State
values are under the
sharedState property located
to separate them from the local Vue States.
Instead of a States keymap we can also pass an array of States.
But keep in mind that then the passed States require a unique
to be properly mapped into the returned State
Passed States without a valid
key are ignored
and won't be represented by the returned keymap.
Thus, the State
value isn't accessible in the
and a State mutation rerender is triggered via.
instead of mutating the
bindAgileInstances isn't typesafe yet. But we are working on it.