Tarjima qoshish uchun havola boyicha o'tib Pull Request oching (havolaga o'tish).
Standart til uchun tarkibni ko'rsatadi.
import { useEvent } from "effector-vue/ssr";
Since effector 23.0.0 useEvent
is deprecated. Use useUnit
instead.
Bind event to current fork instance to use in dom event handlers. Used only with ssr, in application without forks useEvent
will do nothing
Methods
useEvent(unit)
Arguments
Returns
(Function
): Function to pass to event handlers. Will trigger a given unit in current scope
Examples
Basic
import { createStore, createEvent } from "effector";
import { useEvent } from "effector-vue/ssr";
const incremented = createEvent();
const $count = createStore(0);
$count.on(incremented, (x) => x + 1);
export default {
setup() {
const counter = useStore($count);
const onIncrement = useEvent(incremented);
return {
onIncrement,
counter,
};
},
};
Ingliz tilidagi hujjatlar eng dolzarb hisoblanadi, chunki u effector guruhi tomonidan yozilgan va yangilanadi. Hujjatlarni boshqa tillarga tarjima qilish jamiyat tomonidan kuch va istaklar mavjud bo'lganda amalga oshiriladi.
Esda tutingki, tarjima qilingan maqolalar yangilanmasligi mumkin, shuning uchun eng aniq va dolzarb ma'lumot uchun hujjatlarning asl inglizcha versiyasidan foydalanishni tavsiya etamiz.