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

Website Navigation


createComponent | effector

Methods createComponent(options, store?) Arguments
  1. options (Object): component options (hooks, methods, computed properties)
  2. store (Object): Store object from effector
Returns

(vue component)

Example

<template> {{ $counter }} </template>

import { createComponent } from "effector-vue";

const $counter = createStore(0);

const { update } = createApi($counter, {

update: (_, value: number) => value,

});

export default createComponent(

{

name: "Counter",

methods: {

update,

handleClick() {

const value = this.$counter + 1; // this.$counter <- number ( typescript tips )

this.update(value);

},

},

},

{ $counter },

);

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