Effector

Effector

  • Docs
  • Try
  • API
  • Blog
  • Twitter
  • GitHub

›effector-vue

effector

  • API Reference
  • Event
  • Store
  • Effect
  • Domain
  • createStore
  • createEvent
  • createEffect
  • createDomain
  • createStoreObject
  • combine
  • restore
  • createApi
  • clearNode
  • merge
  • split
  • sample
  • guard
  • forward
  • fromObservable

effector-react

  • API Reference
  • useStore
  • useStoreMap
  • useList
  • createComponent
  • Gate
  • createGate
  • useGate
  • createStoreConsumer

effector-vue

  • API Reference
  • VueEffector
  • ComponentOptions
  • Vue
Edit

ComponentOptions

ComponentOptions Properties

effector

Returns

(Function | Object | Store): Store or object of Store, or function which will be called with Component instance as this

Example

import Vue from 'vue'
import {createStore} 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}`,
    )
  },
})
new Vue({
  effector: {
    counter, // would create `counter` in template
  },
})
new Vue({
  effector: counter, // would create `state` in template
})
← VueEffectorVue →
  • ComponentOptions Properties
    • effector
Effector
Docs
Getting StartedAPI Reference
Community
User ShowcaseStack OverflowGitterTwitter
More
GitHubStar
Copyright © 2019 zerobias