You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dependabot-preview[bot] 968436bce4
chore(deps-dev): bump rollup from 2.7.2 to 2.10.9 (#203)
1 month ago
.github/workflows Feat: add lint and test workflow for GH Actions (#49) 5 months ago
docs feat: add useNotification (#177) 2 months ago
scripts fix: Vuepresss deps (#179) 2 months ago
src feat: add useNotification (#177) 2 months ago
test feat: useFetch return response based on response content-type (#98) 3 months ago
.eslintrc.json chore: initial commit 1 year ago
.gitignore feat: useFetch return response based on response content-type (#98) 3 months ago
.prettierrc.js chore: initial commit 1 year ago
CODE_OF_CONDUCT.md docs: added some shields 6 months ago
CONTRIBUTING.md Create CONTRIBUTING.md 9 months ago
LICENSE chore: update license 9 months ago
README.md feat: add useNotification (#177) 2 months ago
commitlint.config.js chore: initial commit 1 year ago
jest.config.js fix: disabled ts-jest diagnostics in jest config (#77) 4 months ago
package.json chore(deps-dev): bump babel-jest from 25.5.1 to 26.0.1 1 month ago
tsconfig.json [WIP] Add Unit tests (#60) 4 months ago
vue-shims.d.ts chore: initial commit 1 year ago
yarn.lock chore(deps-dev): bump rollup from 2.7.2 to 2.10.9 (#203) 1 month ago

README.md

vue-use-web

![Github Actions](https://img.shields.io/github/workflow/status/TarekTouati/vue-use-web/Lint%20and%20test/master?style=flat-square) ![Codacy grade](https://img.shields.io/codacy/grade/866989b533?style=flat-square) ![npm](https://img.shields.io/npm/v/vue-use-web?style=flat-square) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/vue-use-web?style=flat-square) ![npm](https://img.shields.io/npm/dm/vue-use-web?style=flat-square) [![GitHub license](https://img.shields.io/github/license/Tarektouati/vue-use-web?style=flat-square)](https://github.com/Tarektouati/vue-use-web/blob/master/LICENSE)

Web APIs implemented as Vue.js composition functions.

This is a collection of Web APIs exposed as Vue.js composition hooks that’s upcoming in Vue 3.0

You can use them with Vue 2.0 using @vue/composition-api until Vue 3.0 gets out.

What and why

Web APIs are ever changing, this library aims to provide to Vue.js developers a stable interface that integrates well into the ecosystem. Also an interface that degrades gracefully when browsers do not support said features.

I initially was choosing to expose this as a Stateful functional components but that isn’t very handy and is not future proof. Implementing these APIs in Vue composition API (hooks) makes them ready for Vue 3.0 and beyond. Personally I think this is the perfect example to showcase the power of the Composition API.

Installation

# install with yarn
yarn add @vue/composition-api vue-use-web

# install with npm
npm install @vue/composition-api vue-use-web

Usage

Kindly Check the documentation for examples.

APIs

Each composition function is designed to degrade gracefully so you can safely use them, but you should use these as a progressive enhancements for your apps. Check browsers compatibilities for each API.

Inspiration

This library is inspired by the-platform and standard-hooks for React.js.

License

MIT