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/VueEffector below:

Website Navigation


VueEffector | effector

import { VueEffector } from "effector-vue/options-vue3";

effector-vue plugin for vue 3 creates a mixin that takes a binding function from the effector option.

Methods VueEffector(app) Arguments
  1. app (instance Vue): Vue instance
Returns

(void)

Examples Installation plugin

import { createApp } from "vue";

import { VueEffector } from "effector-vue/options-vue3";

import App from "./App.vue";

const app = createApp(App);

app.use(VueEffector);

Effector options

<template>

<div>

<span v-if="createPending">loading...</span>

<p>{{ user.name }}</p>

...

<button @click="create">Create<button>

</div>

</template>

import { $user, create, createFx } from 'model'

export default {

name: 'VueComponent',

effector: () => ({

user: $user,

createDone: createFx.done,

createPending: createFx.pending,

}),

watch: {

createDone() {

// do something after the effect is done

}

},

methods: {

create, // template binding

createFx,

},

...

}

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