Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awesome-creators/vueposu
🧭 A hooks library based on Vue Composition-API.
https://github.com/awesome-creators/vueposu
List: vueposu
swr vue vue-compostion-api vue-hook vue-hooks vue-hooks-library vue-swr vue-use
Last synced: 2 months ago
JSON representation
🧭 A hooks library based on Vue Composition-API.
- Host: GitHub
- URL: https://github.com/awesome-creators/vueposu
- Owner: Awesome-Creators
- License: mit
- Created: 2020-08-24T05:32:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-20T02:46:25.000Z (almost 2 years ago)
- Last Synced: 2024-04-22T20:48:51.883Z (8 months ago)
- Topics: swr, vue, vue-compostion-api, vue-hook, vue-hooks, vue-hooks-library, vue-swr, vue-use
- Language: TypeScript
- Homepage: https://vueposu.netlify.app
- Size: 1.15 MB
- Stars: 14
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- ultimate-awesome - vueposu - 🧭 A hooks library based on Vue Composition-API. (Other Lists / Monkey C Lists)
README
VUEPOSU
🧭 Vue's Eternal Pose (永久指针, 永久指針エターナルポース, Etānaru Pōsu)
(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
```bash
# install with npm
npm i vueposu# install with yarn
yarn add vueposu
```### Vue 2
```bash
# install with npm
npm i vueposu @vue/composition-api# install with yarn
yarn add vueposu @vue/composition-api
```
## 🍳 USAGE
```ts
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
- [`useClickAway`](https://vueposu.netlify.app/dom/useClickAway.html)
- [`useClipboard`](https://vueposu.netlify.app/dom/useClipboard.html)
- [`useEventListener`](https://vueposu.netlify.app/dom/useEventListener.html)
- [`useFavicon`](https://vueposu.netlify.app/dom/useFavicon.html)
- [`useFullscreen`](https://vueposu.netlify.app/dom/useFullscreen.html)
- [`usePageHidden`](https://vueposu.netlify.app/dom/usePageHidden.html)
- [`useTitle`](https://vueposu.netlify.app/dom/useTitle.html)- SENSORS
- [`useMouse`](https://vueposu.netlify.app/sensors/useMouse.html)
- [`useScroll`](https://vueposu.netlify.app/sensors/useScroll.html)
- STATE
- [`useCounter`](https://vueposu.netlify.app/state/useCounter.html)
- [`useCounterInterval`](https://vueposu.netlify.app/state/useCounterInterval.html)
- [`useDynamicList`](https://vueposu.netlify.app/state/useDynamicList.html)
- [`useQueue`](https://vueposu.netlify.app/state/useQueue.html)
- [`useSet`](https://vueposu.netlify.app/state/useSet.html)
- [`useToggle`](https://vueposu.netlify.app/state/useToggle.html)- SWR
- [`useSWR`](https://vueposu.netlify.app/useSWR.html)
- CACHE
- [`useLocalStorage`](https://vueposu.netlify.app/cache/useLocalStorage.html)
- [`useSessionStorage`](https://vueposu.netlify.app/cache/useSessionStorage.html)
- [`useStorage`](https://vueposu.netlify.app/cache/useStorage.html)- SIDE EFFECT
- [`useDebounce`](https://vueposu.netlify.app/side-effect/useDebounce.html)
- [`useDebounceEffect`](https://vueposu.netlify.app/side-effect/useDebounceEffect.html)
- [`useDebounceFn`](https://vueposu.netlify.app/side-effect/useDebounceFn.html)
- [`useEventEmitter`](https://vueposu.netlify.app/side-effect/useEventEmitter.html)
- [`useRequest`](https://vueposu.netlify.app/side-effect/useRequest.html)
- [`useThrottle`](https://vueposu.netlify.app/side-effect/useThrottle.html)
- [`useThrottleEffect`](https://vueposu.netlify.app/side-effect/useThrottleEffect.html)
- [`useThrottleFn`](https://vueposu.netlify.app/side-effect/useThrottleFn.html)
- ANIMATION
- [`useInterval`](https://vueposu.netlify.app/animation/useInterval.html)
- [`useTimeout`](https://vueposu.netlify.app/animation/useTimeout.html)
## Thanks
In no particular order, vueposu is inspired by these great awesome works:
- [react-use](https://github.com/streamich/react-use)
- [vueuse](https://github.com/antfu/vueuse)
- [vue-composable](https://github.com/pikax/vue-composable)
- [vercel/swr](https://github.com/vercel/swr)
- [ahooks](https://github.com/alibaba/hooks)
## License
[The MIT License](https://github.com/Awesome-Creators/vueposu/blob/develop/LICENSE).