A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://effector.dev/en/api/effector-vue/ComponentOptions below:

Website Navigation


ComponentOptions | effector

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.

Examples Basic Usage

import Vue from "vue";

import { createStore, combine } from "effector";

const counter = createStore(0);

new Vue({

data() {

return {

foo: "bar",

};

},

effector() {

// would create `state` in template

return combine(

this.$store(() => this.foo),

counter,

(foo, counter) => `${foo} + ${counter}`,

);

},

});

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

});

More

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4