VUEPOSU
(A hooks library based on Vue Composition-API)
📦 INSTALLATION
Vueposu supports both Vue 3 and 2, but if you are using Vue 2
must ensure installed @vue/composition-api
.
Vue 3
# install with npm
npm i vueposu
# install with yarn
yarn add vueposu
Vue 2
# install with npm
npm i vueposu @vue/composition-api
# install with yarn
yarn add vueposu @vue/composition-api
🍳 USAGE
import { useCounter } from "vueposu";
const Component = defineComponent({
setup() {
// create a counter
const { count, inc, dec, set, reset } = useCounter(0);
return {
count,
inc,
dec,
set,
reset,
};
},
});
🚀 API
Currently supported functions:
-
DOM
-
SENSORS
-
STATE
-
SWR
-
CACHE
-
SIDE EFFECT
-
ANIMATION
Thanks
In no particular order, vueposu is inspired by these great awesome works: