ComponentOptions (Vue2)
effector
Returns
(Function | Object | Store): Store or object of Store’s, or function which will be called with the Component instance as this.
An event or an effect in the object becomes a Store<number> that counts its calls, so a watch of the component can react to it.
Examples
Basic Usage
import Vue from "vue";import { createStore } from "effector";
const counter = createStore(0);
new Vue({ effector() { // called with the component instance as `this` return { counter }; // would create `counter` in template },});Using Object Syntax
import { counter } from "./stores";
new Vue({ effector: { counter, // would create `counter` in template },});Using Store Directly
import { counter } from "./stores";
new Vue({ effector: counter, // would create `state` in template});