createComponent(options, store?)
Arguments
options
(Object): component options (hooks, methods, computed properties)store
(Object): Store object from effector(vue component
)
<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