import { useStore } from "effector-vue/composition";
A hook function, which subscribes to watcher, that observes changes in the current readonly store, so when recording results, the component will update automatically. You can mutate the store value only via createEvent. Designed for vue 3
useStore($store)
Arguments
$store
(Store<State>
)(readonly(State)
)
import { createStore, createApi } from "effector";
import { useStore } from "effector-vue/composition";
const $counter = createStore(0);
const { incremented, decremented } = createApi($counter, {
incremented: (count) => count + 1,
decremented: (count) => count - 1,
});
export default {
setup() {
const counter = useStore($counter);
return {
counter,
incremented,
decremented,
};
},
};
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